Wider feedback requested on two changes to our base/core defaults

Ian Malone ibmalone at gmail.com
Mon Sep 9 19:53:14 UTC 2013


On 22 August 2013 15:50, Ondrej Vasik <ovasik at redhat.com> wrote:
> On Thu, 2013-08-22 at 08:21 -0500, Chris Adams wrote:
>> Once upon a time, "Jóhann B. Guðmundsson" <johannbg at gmail.com> said:



>> - The "user@" is mostly useless; if you su/sudo to root, the character
>>   at the end of the prompt changes from $ to #.  The only time I would
>>   be interested in seeing user@ is if I've su/sudo to a user (other than
>>   root) that doesn't match the login user for this TTY; on Linux this
>>   can be as easy as the following bit of bash:
>>
>>       local user=""
>>       if [ "$UID" != 0 -a ! -O /proc/self/fd/0 ]; then
>>               user='\u@'
>>       fi
>>       PS1="$user"'\h \W\$ '
>
> Good suggestion, I like it - and maybe it would make sense to change the
> default to this if wider audience will agree on that.
> Still I don't agree that this is useless - I usually have several
> terminals with ssh connection and they are differentiated in user (e.g.
> per tool I'm using on that machine). Having only hostname will make it
> harder for me (as the hostnames differ only in number). Most of the
> users probably don't have this scenario, so I'm a bit toward to +1 here.
>

I'd like to add myself as another datapoint for 'uses different
users', and often via ssh. In any case, that bash prompt trick surely
only works if applied to all user profiles or all systems being used.

-- 
imalone
http://ibmalone.blogspot.co.uk


More information about the devel mailing list