Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Coolest prompt?
- X-seq: zsh-users 7554
- From: Julius Plenz <jp@xxxxxxx>
- To: ZSH-users <zsh-users@xxxxxxxxxx>
- Subject: Re: Coolest prompt?
- Date: Tue, 15 Jun 2004 17:18:40 +0200
- In-reply-to: <87CE3664-BBF7-11D8-9BE4-000393ABF2F0@xxxxxxxxxxxxxxxxxx>
- Mail-followup-to: ZSH-users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: CVMX, kostenloser Mail- und Newsservice
- References: <200406111329.45312.myrmidon@xxxxxxxxxxx> <87CE3664-BBF7-11D8-9BE4-000393ABF2F0@xxxxxxxxxxxxxxxxxx>
* 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