autowrap
Rob Bernardo
rob at pbhyf.PacBell.COM
Tue Sep 6 07:36:29 AEST 1988
In article <3854 at bsu-cs.UUCP> dhesi at bsu-cs.UUCP (Rahul Dhesi) writes:
+In article <8437 at smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>)
+writes:
+>(At
+>present we also don't emulate line wrap for terminals that lack it,
+>because we don't want the shell to have to depend on termcap.)
+
+May I recommend that you, and other designers, do so, please. There is
+no need to backspace across screen lines, but when normally sending
+output to the terminal, autowrap emulation would be useful.
I haven't been following this discussion, so forgive me if I'm
posting something irrelevant or something already said.
Autowrap might not be as easy to implement currectly in the shell as
it seems. I ran into a problem with this in ksh. Ksh uses screen
width when presenting a previous command when engaging in command
editing. The short of it is that if the whole command undergoing
editing doesn't fit between your prompt and the right margin it
indicates at one or both ends that the command is only partially
displayed.
Well, I ran into a problem when my prompt contained escape sequences
to do some fancy stuff (e.g. going to the status line, displaying the
date, time, cwd, etc and then returning to the normal screen line and
displaying the command number in reverse video. Whew!). Well ksh
wasn't smart enough to know that all those characters in the prompt
weren't occupying space on the current screen line and when I enter
command editing, it gave me a teeny editing window. Even if I had
done something simpler with the prompt, like putting it in reverse
video (without including the status line stuff), ksh's notion of what
column the cursor was in would still be mistaken.
To get around this I had to set COLUMNS to a much larger number than
the 80 it should have been. But I had to make sure not to export COLUMNS,
or else vi and other programs would have access to it and have a mistaken
notion of the screen width.
--
Rob Bernardo, Pacific Bell UNIX Small Bus. Systems Development & Maintenance
Email: ...![backbone]!pacbell!rob OR rob at PacBell.COM
Office: (415) 823-2417 Room 4E750A, San Ramon Valley Administrative Center
Residence: (415) 827-4301 R Bar JB, Concord, California
More information about the Comp.unix.wizards
mailing list