Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2002 12:07:49 -0800 (PST)
From:      Thomas Cannon <tcannon@noops.org>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Shell prompt contest
Message-ID:  <20020102115849.P73145-100000@stereophonic.noops.org>
In-Reply-To: <B8589E4B.1AF6%wbaehr@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help

I'm not one for fancy prompts with the date, room temperature, time since
the epoch, Foundry's stock price, and barometric pressue in my PS1.
However, I do like to add a bit of practical use to things when I can.

I switch between my usual 'tcannon' login and root quite a bit, as I'm
always tweaking or tinkering, and have always had my login name show up in
my prompt. However, lately I've added another simple brain-dead problem
avoidance mechanism -- my prompt changes color depending on who i'm logged
in as, and on which machine. It's green if I'm 'tcannon' and red if I'm
root... which might just save me from a think-o when I'm working at 3:00am
on code and chianti at the same time.

tcannon has this in the dotfiles:

PS1="\[\033[1;32m\][\u@\h]\\$ \[\033[0m\]"

root has this:

PS1="\[\033[1;31m\][\u@\h]\\$ \[\033[0m\]"


Simple, and not too terribly creative, but I find it handy.

Happy new year,

thomas



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020102115849.P73145-100000>