* 3.0.5: PROMPT and output on the same line
@ 1999-03-31 8:22 Jos Backus
0 siblings, 0 replies; 4+ messages in thread
From: Jos Backus @ 1999-03-31 8:22 UTC (permalink / raw)
To: zsh-users
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.
Cheers,
--
Jos Backus _/ _/_/_/ "Reliability means never
_/ _/ _/ having to say you're sorry."
_/ _/_/_/ -- D. J. Bernstein
_/ _/ _/ _/
Jos.Backus@nl.origin-it.com _/_/ _/_/_/ use Std::Disclaimer;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 3.0.5: PROMPT and output on the same line
@ 1999-03-31 8:29 Sven Wischnowsky
1999-03-31 8:45 ` Jos Backus
0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 1999-03-31 8:29 UTC (permalink / raw)
To: zsh-users
Jos Backus wrote:
> 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.
% zsh -f
beta% echo -n ho
beta% setopt nopromptcr
beta% echo -n ho
hobeta%
Maybe this should be in the FAQ.
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 3.0.5: PROMPT and output on the same line
1999-03-31 8:29 Sven Wischnowsky
@ 1999-03-31 8:45 ` Jos Backus
0 siblings, 0 replies; 4+ messages in thread
From: Jos Backus @ 1999-03-31 8:45 UTC (permalink / raw)
To: Sven Wischnowsky; +Cc: zsh-users
On Wed, Mar 31, 1999 at 10:29:33AM +0200, Sven Wischnowsky wrote:
> % zsh -f
> beta% echo -n ho
> beta% setopt nopromptcr
> beta% echo -n ho
> hobeta%
Grr, I searched the manpages for 'newline' but didn't see anything relevant.
> Maybe this should be in the FAQ.
I agree, especially because zsh's default behavior differs from a number of
other shells at least. A colleague of mine pointed this behavior out to me the
other day when I was doing some zsh evangelizing.
Thanks, Sven!
--
Jos Backus _/ _/_/_/ "Reliability means never
_/ _/ _/ having to say you're sorry."
_/ _/_/_/ -- D. J. Bernstein
_/ _/ _/ _/
Jos.Backus@nl.origin-it.com _/_/ _/_/_/ use Std::Disclaimer;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 3.0.5: PROMPT and output on the same line
@ 1999-03-31 8:31 jr
0 siblings, 0 replies; 4+ messages in thread
From: jr @ 1999-03-31 8:31 UTC (permalink / raw)
To: zsh-users
>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!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-03-31 8:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-31 8:22 3.0.5: PROMPT and output on the same line Jos Backus
1999-03-31 8:29 Sven Wischnowsky
1999-03-31 8:45 ` Jos Backus
1999-03-31 8:31 jr
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).