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

prompts with newlines get printed twice



Hey guys. I'm new to zsh and I have been playing with getting my prompt set
up nicely.

The problem I'm encountering is that when I create a newline in the prompt,
the prompt gets printed twice when I open the terminal.

Example:

In ~/.zshrc

PROMPT='%n @ %m
$ '

results in:

Last login: Fri Sep 23 19:13:38 on ttys000
user at host
user at host
$

This happens without fail whenever I open the Terminal application,
regardless of the amount of tabs. However, once the application is running,
if I open a new window or tab, this does not happen and the prompt is
correctly displayed only once. What intrigues me is that it only prints the
top part twice but not the '$' part. Any guesses as to why this might be
happening? I have spent hours on it to no avail, so I would really
appreciate any help.

I'm on Mac OS X 10.7 Lion.
zsh version is 4.3.11, what came with Lion.
I also experience this with 4.3.12 that I installed with brew.
This happens even if I change the Terminal to run /bin/zsh instead of
/usr/bin/login

Thanks.

-- 
- Jorge Israel Peña


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