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

Re: volume label in prompt?



On 25/10/12 05:57 PM, TJ Luoma wrote:


Thanks, I knew about all of these, but now that I think about it again, I realize that I can do what I want simply by changing the hostname of each distro to something specific and
informative, and that's very satisfactory.
On Thu, Oct 25, 2012 at 7:15 PM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
I'm now running three machines here, each with several copies of various
linii available.  It gets a bit confusing.  I'm wondering if there might be
something I can add to my prompt that could help me remind myself where I'm
at.  I'm open to any suggestions, but one idea I had was something to
identify the volume label of the current root directory.  That would do it
if it can be done. Can it?
PROMPT="%n@%m %~: "

n = username

m = hostname up to first "."

%~ is the current directory, using ~ for $HOME when appropriate.




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