From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22105 invoked from network); 31 Mar 1999 08:32:23 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Mar 1999 08:32:23 -0000 Received: (qmail 23526 invoked by alias); 31 Mar 1999 08:31:29 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2264 Received: (qmail 23515 invoked from network); 31 Mar 1999 08:31:28 -0000 Message-ID: <19990331083126.26318.qmail@master.scms.rgu.ac.uk> From: jr@scms.rgu.ac.uk Date: Wed, 31 Mar 1999 09:31:25 +0100 (BST) Reply-To: John Riddoch Subject: Re: 3.0.5: PROMPT and output on the same line To: zsh-users@sunsite.auc.dk MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: Bb8Ks3cMw9Sf4fPLdY9gSg== X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc >hal:/usr/src# zsh -f >hal# echo -n hi >hal# sh ># echo -n hi >hi# csh -f ># echo -n hi >hi# tcsh -f ># echo -n hi >hi# ksh ># echo -n hi >hi# exit > >Note that between lines 2 and 3, there's no ``hi''. > >This is on FreeBSD -current, using the stock /bin/{c,}sh, pdksh-5.2.13 and >tcsh-6.08.00. Using script, I get this: Script started on Wed 31 Mar 1999 09:24:59 BST ^M^[[m^[[m^[[m^[[Jair% ^[[Kl^H ^He^Hecho -n hi^M^M hi^M^[[m^[[m^[[m^[[Jair% ^[[Ke^Hexit script done on Wed 31 Mar 1999 09:25:08 BST Basically, zsh puts some control characters at the start of the prompt, forcing itself to the start of the line. This also happens with: #!/usr/local/bin/perl print "hello"; Since there is no \n, the prompt overwrites the "hello". Also: air% echo -n hi; echo "" hi air% The second echo sends a newline, and the "hi" is visible. I don't know whether to consider this action a bug or a feature; certainly, it's easy enough to work around and probably simple enough to patch a fix for (simply remove the control characters before printing $PS1) -- John Riddoch Email: jr@scms.rgu.ac.uk Telephone: (01224)262730 Room C4, School of Computer and Mathematical Science Robert Gordon University, Aberdeen, AB25 1HG I am Homer of Borg. Resistance is Fu... Ooooh! Donuts!