Bug 139628 - RFE: colors for bash prompts
RFE: colors for bash prompts
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-16 19:20 EST by Rahul Sundaram
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-09 07:22:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rahul Sundaram 2004-11-16 19:20:43 EST
Description of problem:


Version-Release number of selected component (if applicable):

steps

Stick it at the end of /etc/bashrc

if [ `id -un` = root ]; then

PS1='\[\033[1;32m[\033[1;35m\]\u@\h\W\[\033[1;32m]\033[1;32m\]\$\[\033[1;0m\]'
else

PS1='\[\033[1;32m[\033[1;36m\]\u@\h\W\[\033[1;32m]\033[1;32m\]\$\[\033[1;0m\]'
fi

root prompts and non root prompts are not differentiated with colors. 
  
Actual results:

root prompts and non root prompts are not differentiated with colors.
this would be especially be useful for desktop systems and home users
to warn them that root usage is privelaged

Expected results:

It should use colors to differentiate prompts

Additional info:

credit:rank AT pineaus.com
Comment 1 Tim Waugh 2004-12-08 11:10:05 EST
No colour scheme will please everyone, but at the very least it should be
something simpler!  All red, for instance, for a root login.
Comment 2 Rahul Sundaram 2004-12-08 11:59:19 EST
Hey

That was just an example. Go ahead and implement a more simple mechanism. All I
am suggesting is a simple method to differentiate between root and normal user
accounts
Comment 3 Tim Waugh 2004-12-08 12:19:11 EST
See fedora-devel-list discussion:

https://www.redhat.com/archives/fedora-devel-list/2004-December/msg00278.html
Comment 4 Tim Waugh 2004-12-09 07:22:34 EST
I think David Woodhouse's objection is most succinct:

  If the  user is unaware of the distinction and the danger of doing things as
  root, changing the colour of the prompt isn't going to help. If the user
  _is_ aware of the difference, then the standard $/# indicator is
  sufficient.

Note You need to log in before you can comment on or make changes to this bug.