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

Re: Coolest prompt?



* It was Fri, Jun 11, 2004 at 01:29:45PM +0300 when Ziggy said:
> ZSH allows the user to create interesting prompts. Time displaying, menu bars 
> and colors.
> 
> Post your prompt (and .zshrc) here.

Mine is quite simple, but I find it to be useful without cluttering up
my terminal.

sjs@diavolo ~ % grep PROMPT .zshrc
# PROMPT SUBTITUTION
export PROMPT=$'%(?..%{\e[41;38m%}%B-%?-%b%{\e[0m%} )%(1j.%{\e[01;33m%}[%j] .)%{\e[01;36m%}%n@%m%{\e[0m%} %{\e[01;32m%}%2~%{\e[0m%} %B%#%b '
export RPROMPT=$'%{\e[01;31m%}[%!]%{\e[0m%}'		# history # on right

It ends up looking like the above, however when there are jobs running
it prepends [N] in yellow, where N is the number of jobs running. If the
exit code of the previous command was non-zero in white on red it
displays -$?- before the prompt. Where ~ is above it displays 2
directories of $PWD. (eg. ~/devel or kernel/linux-2.6.7-rc3-mm1)

-- 
Sami Samhuri

Attachment: pgpRRdbsmYO4c.pgp
Description: PGP signature



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