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

Re: Coolest prompt?



* William Scott <wgscott@xxxxxxxxxxxxxxxxxx> [2004-06-12 00:50]:
> My prompt: %

Well,...

> I keep the prompt simple

I see. I also like simple prompts, but a _bit_ more infos are ok.  ;-)
Therefore my prompt looks like this (relevant parts, be careful with wraps):

precmd () {
 TMPPATH="        "$PWD
 SHORTPATH=${(M)TMPPATH%???????????}
 PS1=$(echo "%{\033[0;36m%}$SHORTPATH%{\033[0m%},%{\033[0;31m%}%j%{\033[0m%}%% ")
}

To see this Prompt in action, look at this example:

e/www/plenz,0% cd www/
w/plenz/www,0% cd plenz.com/
w/plenz.com,0% cd /tmp
       /tmp,0% sleep 10&
[1] 16056
       /tmp,1% cd
[1]  + 16056 done       sleep 10
e/www/plenz,0%

So, you see, there is a fixed path-length and the number of
background jobs. I really like this prompt, its simple but gives
enough information.

Julius
-- 
www.plenz.com



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