From: "Jason Donenfeld" <zx2c4@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
Date: Sat, 10 Jun 2017 03:06:49 +0000 (UTC)	[thread overview]
Message-ID: <1497064002.1db68b96bcedd3ace96a31729cbdc17c71afdb86.zx2c4@gentoo> (raw)
commit:     1db68b96bcedd3ace96a31729cbdc17c71afdb86
Author:     Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 10 02:06:07 2017 +0000
Commit:     Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 03:06:42 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1db68b96
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 <AT> gentoo.org>
 app-shells/bash/files/bashrc | 4 ++--
 1 file 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
next             reply	other threads:[~2017-06-10  3:06 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-10  3:06 Jason Donenfeld [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-09-30 20:14 [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/ Sam James
2025-09-30 20:14 Sam James
2025-01-04 22:47 Conrad Kostecki
2024-12-07 12:48 Sam James
2024-12-07 12:48 Sam James
2024-12-06 23:12 Conrad Kostecki
2023-12-31  2:38 Conrad Kostecki
2023-04-26 21:08 Mike Gilbert
2023-04-25 21:30 Sam James
2023-03-04 19:29 Sven Wegener
2022-11-16 18:36 Conrad Kostecki
2022-09-11 23:13 Mike Gilbert
2021-07-10 21:16 Conrad Kostecki
2021-05-29 18:51 Lars Wendler
2020-12-01 13:16 Lars Wendler
2020-06-13 16:24 Mike Gilbert
2019-09-15  7:53 Mike Frysinger
2018-06-26 15:05 Mike Gilbert
2018-01-04 23:48 Sven Wegener
2017-10-20  7:45 Patrice Clement
2017-06-10 12:02 Jason Donenfeld
2017-06-10  3:07 Jason Donenfeld
2016-07-16  9:54 Patrice Clement
2016-06-23  6:03 Mike Frysinger
2016-06-23  5:31 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-01-26  7:23 Mike Frysinger
2016-01-26  7:23 Mike Frysinger
2016-01-26  7:23 Mike Frysinger
2015-12-02 18:59 Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=1497064002.1db68b96bcedd3ace96a31729cbdc17c71afdb86.zx2c4@gentoo \
    --to=zx2c4@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox