Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 518342 - app-shells/bash: PS1 pwd different for root and non-root user (\W vs \w)
Summary: app-shells/bash: PS1 pwd different for root and non-root user (\W vs \w)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-27 19:54 UTC by three sixes
Modified: 2014-11-23 18:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description three sixes 2014-07-27 19:54:31 UTC
bashrc ps1 has W's instead of w's resulting in docked paths....

Reproducible: Always

Steps to Reproduce:
1.as user cd /var/www/localhost/htdocs
2.observe user@host /var/www/localhost/htdocs $
3.switch to root vi su
4.observe host htdocs # <---with sub directory of sub directory chopped off.


Expected Results:  
host /var/www/localhost/htdocs #

ubuntu cent LFS & arch all use w's so gentoo seems very strange to new users.

we have w's for users but W's for root?  ps1 should ship defacto defaults & customization be explained and documented in wiki pages.
Comment 1 SpanKY gentoo-dev 2014-08-01 05:57:40 UTC
we've had it this way for over 10 years:
http://sources.gentoo.org/app-shells/bash/files/bashrc?revision=1.2&view=markup

any choice we make someone won't like, and i don't really see the need to bikeshed this particular aspect.  sorry.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-17 22:36:44 UTC
[with QA hat on]

I think there's a small communication issue here. The main point here is that we have different escapes for root and non-root user. I personally don't care if it's \w or \W as long as it is consistent.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-18 15:02:32 UTC
How is this a QA issue?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-18 15:05:47 UTC
Lack of consistency affects user experience. QA is about having a good user experience.
Comment 5 SpanKY gentoo-dev 2014-11-18 19:25:26 UTC
yeah, i don't buy any of those arguments
Comment 6 Sergey Popov gentoo-dev 2014-11-20 12:53:59 UTC
I agree with vapier: it's not a big deal, it's not hard to redefine this in per-user basis and it does not need to be consistent for root/non-root users at all.

You are not arguing that root has host address colored in red, when ordinary users - in green, are you?

If it's a distribution default, it should be described in some document - that' a good point, yeah
Comment 7 Rafał Mużyło 2014-11-23 18:09:22 UTC
Just to add my 2c to this bike-shedding: IIRC, I've always set that the *other* way around - docked paths for both normal user and root.

A bit annoying, but mostly cosmetic.