Re: RFC: root/non-root bash prompts different colours?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2004-12-08 at 12:53 -0500, Nick Bargnesi wrote:
> Yet another option would just be to alter PS1 to display something like:
> 
> -- WARNING - LOGGED IN AS ROOT --
> [root@machine root]#  

I like modifying PS1 to include this warning. It's simple and effective.
At least one person has expressed disgust at the idea of a multi-line
PS1, but it isn't hard to remove after installation. Of course, I may
not be one to speak as my PS1 is five lines tall.

Just want to re-inforce a point already made by Nick: 



> export PS1="\n-- WARNING - Use your head.  You're root. --\n[\u@\h
\W]$ "

I've found that with multi-line prompts, including a blank line at the
start makes them much easier to read. Although that does push root's PS1
from a moderate 2 lines to a slightly extreme three...

-- 
Stuart Jansen <sjansen@xxxxxxxxxxxx>
Guru Labs, L.C.

Attachment: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux