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

Re: Weird behaviour with certain PS1-sequences



In the last episode (Sep 27), Bart Schaefer said:
> On Sep 27, 10:14pm, Juhapekka Tolvanen wrote:
> > If I have this in .zshrc or give this in command line, shell goes
> > to endless loop. Terminal is all blank and Ctrl-c and Ctrl-z does
> > not help at all.
> > 
> > export PS1='%h|%l|%n@%m:%/ %# '
> 
> I can't reproduce this on Linux.  I've tried various prompt-related
> setopts with no change in the behavior.

I can reproduce this easily with zsh 3.0.6 or 3.1.6 on FreeBSD (2.2.6
and 4.0).  The TERM variable has to be set to a 'dumb'-style terminal,
or blank.  I thought I could reproduce it on Solaris 2.6 but it doesn't
seem to be cooperating right now.

% zsh -f
% PROMPT="%m %n %/ %%"
dan dan /home/dan % TERM=dumb
dan dan /home/dan % 
                    ^ blanks start here and don't stop

Oddly enough, "%m%n%/" doesn't trigger the bug. "%m  %n" does. "%m %n"
does not.

Termcap entry for 'dumb':

dumb|un|unknown:am:co#80:do=^J:

-- 
	Dan Nelson
	dnelson@xxxxxxxxxxxx



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