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

Re: hostname in prompt



According to Markus Wilke on Mon, Aug 06, 2001 at 01:32:11PM +0200:
| Hello everyone,
| 
| I updated my zsh-3.1.9 to 4.0.2 on a Solaris 2.6 box, but now my prompt is
| not working correctly any more. I have the hostname in the prompt, and now
| instead of the hostname "SunOS" appears (regardless on what solaris machine
| zsh runs).
| 
| Had anybody else encountered this phenomena?

I have:

[ $HOSTNAME = 'apple.fruitcom.com' ] && {
PS1="[%B%n%b@%m %c] %B `echo $WINDOW`%b $ "
}
[ $HOSTNAME = 'plum.fruitcom.com' ] && {
PS1="[%n@%B%m%b %c] %B`echo $WINDOW`%b $ "
}

the first emphasises the $USER and the second the $HOST.
In an xterm the emphasis can show up in color.

-- 
Eric Smith



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