[LUNI] Show us your PS1!

Keith T. Garner kgarner at kgarner.com
Fri Jun 6 12:25:29 CDT 2003


On Thu, Jun 05, 2003 at 07:53:40, Seva Epsteyn said:
> Please specify the shell as well if you are using something like Keith's zsh 
> weirdness of PS1="%n@%m [%!]%(!.#.:)"

yeah, yeah, I'm a freak.  Basically the above ends up looking
something like: "kgarner at zorak [529]:" for normal user mode and
something like "root at zorak [2]#" when root.  Although, I use sudo so
much, I never see that.

Of course, that is only have the story of my prompt.  In zsh their is
RPS1 for right side stuff.  My RPS1 is "%20<..<%~%<<" which means show
the PWD, unless its longer then 20 chars and then right truncate it
and have it predicated with ..

So my full prompt usually looks something like:
  kgarner at zorak [513]:                      ~/src/work

Or
  kgarner at zorak [513]:                      ..c/work/nar/retsdb2
  
Lots more info at
http://zsh.sourceforge.net/Doc/Release/zsh_12.html#SEC39

Keith

-- 
   Keith T. Garner                                        kgarner at kgarner.com
   The whole problem with the world is that fools and fanatics are always so
 certain of themselves, and wiser people so full of doubts.  --Bertrand Russell


More information about the luni mailing list