Subject: Re: DEC vt320 terminal problem
To: Shannon Hendrix <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 06/17/2001 16:22:19
[ On Saturday, June 16, 2001 at 22:41:30 (-0400), Shannon Hendrix wrote: ]
> Subject: Re: DEC vt320 terminal problem
> I finally relented and turned on autowrap in the terminal setup, but that
> still misses a newline. Here's an example of what my screen looks like:
Most every termcap entry I know of assumes that autowrap is enabled.
Some even assume reverse wrap-around is turned on too.
Note also that any shell which supports command-line editing will (if
that feature is enabled) munge your stty settings while it's sitting and
reading input a the prompt.
In other words some of your strange stty observations may also be due to
your shell munging things.
Perhaps you should try using a standard shell (eg. /bin/sh) with a
default prompt (eg. PS1='$ '), and without turning on any features
(especially not 'set -o emacs', etc.) and see if your problems persist.
I suspect you're viewing the symptoms of something totally unrelated to
what you think it is. (I'm guessing the way your shell is trying to do
multi-line prompts is incorrect, either because it thinks you have a
different type of terminal than you do, or possibly because the termcap
it is using is wrong, or maybe just because your shell has a bug.)
I general I'd also strongly recommend against trying to use multi-line
prompts with any shell, especially when combined with command-line
editing. Very few shells get this "right", at least not without using
special trickery. Also avoid putting any terminal control escape
sequences in your prompt -- they will also screw up the shell and even
sometimes the tty driver. FYI this is documented somewhat in ksh(1):
Note that since the command line editors try to
figure out how long the prompt is (so they know how
far it is to edge of the screen), escape codes in
the prompt tend to mess things up.
That paragraph goes on to describe a trick that might work to allow you
put escape codes in your prompt.
There's also still a bug in the 'ksh' command-line editor that's
triggered by having a prompt longer than the screen is wide. /bin/sh
does a lot better at this, at least on an Xterm with the right settings.
pkgsrc/misc/vttest might help you get your terminal settings right....
Greg A. Woods
+1 416 218-0098 VE3TCP <email@example.com> <firstname.lastname@example.org>
Planix, Inc. <email@example.com>; Secrets of the Weird <firstname.lastname@example.org>