Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

4855 does not work in all cases



>
>                 Have you got a look at 4855? Among other things, it
> > makes Zsh to output '\r' in this case.
>
> Sorry. I've meant '\n' of course :-( This automagically does the trick on all
> three terminal types (no am, am with COLUMNS wrap and am with COLUMNS+1 wrap)
>
> /andrej
>

I looks, like I have not used some terminals for really long time ... That is
even worse. I just found a terminal of type 2 (wrap on COLUMNS) that
unfortunately prints extra newline if prompt is exactly COLUMNS chanrters
-( SO, either we have here fourth type ... or nobody on this list never used
terminals of type 2 after 4855.

To test - just try something like

echo "----(80 characters)\n===" and see if you get extra newline. I believe,
this is exactly what happens with AIX term. It does not happen with all
terminals program I'm using here (xterm/dtterm) :-)

After some tests it appears, that the only actually clean way is to output

"<blank><backspace>"

in this case. Blank will force new line and backspace will move to the first
column again. Again, this is needed *only* if the last line is exactly COLUMNS
(better said, if no printable character follows).

Sigh ...

/andrej



Messages sorted by: Reverse Date, Date, Thread, Author