Path: utzoo!attcan!uunet!husc6!mailrus!ames!amdahl!pacbell!pbhyf!rob From: rob@pbhyf.PacBell.COM (Rob Bernardo) Newsgroups: comp.unix.wizards Subject: Re: autowrap Message-ID: <3904@pbhyf.PacBell.COM> Date: 5 Sep 88 21:36:29 GMT References: <1988Sep2.224258.27960@gpu.utcs.toronto.edu> <1402@spp2.UUCP> <8437@smoke.ARPA> <3854@bsu-cs.UUCP> Reply-To: rob@pbhyf.PacBell.COM (Rob Bernardo) Organization: Pacific * Bell, San Ramon, CA Lines: 42 In article <3854@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: +In article <8437@smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) +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@PacBell.COM Office: (415) 823-2417 Room 4E750A, San Ramon Valley Administrative Center Residence: (415) 827-4301 R Bar JB, Concord, California