summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2017-06-10 04:06:07 +0200
committerJason A. Donenfeld <zx2c4@gentoo.org>2017-06-10 05:06:42 +0200
commit1db68b96bcedd3ace96a31729cbdc17c71afdb86 (patch)
treec6a928684f74900f37eb2a8f6e1727681fd00064
parentapp-admin/mcelog: Version bump to 152 (diff)
downloadgentoo-1db68b96bcedd3ace96a31729cbdc17c71afdb86.tar.gz
gentoo-1db68b96bcedd3ace96a31729cbdc17c71afdb86.tar.bz2
gentoo-1db68b96bcedd3ace96a31729cbdc17c71afdb86.zip
app-shells/bash: show full cwd for root user
Though the first declaration of PS1 in this file uses \w uniformly for root and non-root, the two subsequent ones inconsistently do not. Thus, a normal user is able to see clearly where he is in the file system, whereas the root user -- who should have this sort of visibility -- does not, since \W (upper-case) is used instead. It seems clear that this difference is just the result of an old bug; \w for both user types is clearly more reasonable. This patch fixes things up as such. Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
-rw-r--r--app-shells/bash/files/bashrc4
1 files changed, 2 insertions, 2 deletions
diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 6db69668195..03694691d4a 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -86,7 +86,7 @@ fi
if ${use_color} ; then
if [[ ${EUID} == 0 ]] ; then
- PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
+ PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \w \$\[\033[00m\] '
else
PS1+='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi
@@ -99,7 +99,7 @@ if ${use_color} ; then
else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
- PS1+='\u@\h \W \$ '
+ PS1+='\u@\h \w \$ '
else
PS1+='\u@\h \w \$ '
fi