From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3791 invoked from network); 8 Jul 1999 12:13:41 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Jul 1999 12:13:41 -0000 Received: (qmail 1403 invoked by alias); 8 Jul 1999 12:13:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7037 Received: (qmail 1395 invoked from network); 8 Jul 1999 12:13:31 -0000 Message-ID: <378494E5.FC4E0462@thoth.u-net.com> Date: Thu, 08 Jul 1999 13:09:09 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.61 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: Andrej Borsenkow , zsh-workers@sunsite.auc.dk Subject: Re: 4855 does not work in all cases References: <000601bec934$c4cd3de0$21c9ca95@mow.siemens.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 > "" 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