Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 4855 does not work in all cases
- X-seq: zsh-workers 7037
- From: Oliver Kiddle <opk@xxxxxxxxxxxxxxx>
- To: Andrej Borsenkow <Andrej.Borsenkow@xxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: 4855 does not work in all cases
- Date: Thu, 08 Jul 1999 13:09:09 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <000601bec934$c4cd3de0$21c9ca95@xxxxxxxxxxxxxx>
Andrej Borsenkow wrote:
>
> >
> > 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
I was trying to work out what 4855 was doing and how \n was doing anything
'automagically' as I was getting nothing to work in all cases for my tests.
> 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.
Well I'm using this type (aixterm) and was noticing occaisional mess with the
terminal output but it was only recently that I tried to repeat the problems
and find the cause. Before 4855, I was on a different project and wasn't using
AIX. I wish SGI would open the source to xwsh.
> 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) :-)
Yup, I've been using:
echo "First line\n${(l:79:)}XLast line"
and sticking lots of strange stuff after the X with little success.
> After some tests it appears, that the only actually clean way is to output
> "<blank><backspace>"
I hadn't tried this but it is the first thing which actually works for both xterm
and aixterm. It doesn't work when you turn of line wrapping but I take it that
we can get this out of terminfo/termcap (am?)? This blank,backspace thing is a
bit of a hack so I think we should attempt to find a proper way of handling the
different cases - how does ncurses or something else handle this.
Looking at the man page for terminfo, I found this which might be relevant:
Boolean Capabilities
Variable Cap Name I. Code Description
eat_newline_glitch xenl xn Ignores new-line character after 80
columns
I couldn't find a quick way of determining the value for this capability for
various terminals and I wouldn't be suprised if it isn't widely supported. I
hope by '80' they mean the terminal width.
I suggest that we first attempt to get a small program or shell script working
which we can all test on different terminals before Sven (or someone) launches
into a major fix of the zsh code. I also agree with Andrej that it would seem
wise to have one low-level routine or set of routines for handling terminal
output - only one part of the code would have to worry about different terminal
behaviour.
Oliver Kiddle
Messages sorted by:
Reverse Date,
Date,
Thread,
Author