Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 May 1998 13:23:29 -0700 (PDT)
From:      David Wolfskill <dhw@whistle.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: ^C on 'man' page stops Carriage Return on xterm
Message-ID:  <199805282023.NAA10703@pau-amma.whistle.com>

next in thread | raw e-mail | index | archive | help
>Date: Thu, 28 May 1998 15:46:49 +0100
>From: "Wall, Jonathan" <jw1@mm-croy.mottmac.com>

>If I exit from a 'man' page halfway through its contents using control C 
>(^C) then subsequent pressing on the Enter key fails to move the prompt 
>onto a new line. Instead the new prompt appears further along the 
>original line.  Any characters I enter fail to appear at the prompt until 
>after I push the Enter key.  At the moment I have to start a new xterm to 
>get round this (or try to remember to not use ^C in a man page)

First, remembering to not use ^C to exit "man" is an excellent idea.  :-}

The way to exit "man" is somewhat dependent on what "pager" you use
("less" and "more" are typical examples).  It is usual for a "pager" to
need to do some "interesting" thing to your display, so it will place
the controlling terminal in "raw" mode.

In order for the program to put things back the way they were, it needs
to have a chance to do that.  Yes, the program in question could have
been wrwitten so that if it received a "TERM" signal, it would clean
things up & exit gracefully.  Evidently, the program you are using
doesn't, so you need to exit it in a less violent way; often typing "q"
at the display will accomplish this.

And should you find yourself in such a situation, often the following
will be useful.  Type:

stty sane^J

just as above (where, of course, ^J is control-J).

Also, xterms can be reset, often (sorry; like much else, you could have
changed things, since it's configurable) by holding the control key
down, moving the mouse into the body of the xterm window, and holding
the middle mouse button down.  You should see a "VT Options" menu pop
up; slide the mouse down to the "Do Full Reset" line, then release the
mouse button (& the control key).

>PS./	 Please let me know if this message is not formatted correctly - I 
>am using DaVinci eMAIL for Windows and despite adding the line 'Unix_Wrap 
>= 70' to the inifile I don't think it's doing much good.

Seemed OK on this end, and I'm using /usr/ucb/mail, which is about as
primitive a mailer as there is anymore....

david
-- 
David Wolfskill		UNIX System Administrator
dhw@whistle.com		voice: (650) 577-7158	pager: (650) 371-4621

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805282023.NAA10703>