app-shells/bash-4.2_p45 is shipping with bad default configs. Reproducible: Always
Created attachment 371442 [details, diff] bashrc.patch patch for /etc/bash/bashrc
Created attachment 371444 [details, diff] bash_logout.patch patch for sane /etc/bash/bash_logout
Comment on attachment 371442 [details, diff] bashrc.patch >--- bashrc 2014-02-28 07:18:38.079771357 -0500 >+++ bashrc.sane 2014-02-28 07:23:27.579565292 -0500 >@@ -60,11 +60,17 @@ > fi > > if [[ ${EUID} == 0 ]] ; then >- PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] ' >+ PS1='\[\e[01;31m\]\u@\h\[\e[01;31m\] [ \[\e[0m\]\w\[\e[1;31m\] ] \$\[\033[0m\] ' > else >- PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' >+ PS1='\[\e[01;32m\]\u@\h\[\e[01;32m\] [ \[\e[0m\]\w\[\e[1;32m\] ] \$\[\033[0m\] ' How is that more sane, other than that PS1 now looks like it does on random other distros? > fi > >+ alias sudo='sudo ' Oh, sudo is installed? And this saves you from typing an extra space when you were already going to type a tab? Or how would that work? >+ alias rm='rm -i' >+ alias cp='cp -i' >+ alias mv='mv -i' Wrong distro again? >+ alias ping='ping -c 5' And what if you then want to run ping without that limitation? >+ alias emerge='emerge --ask-enter-invalid -av' emerge is installed? And we all want this as default? >@@ -72,9 +78,9 @@ > 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 \$ ' >+ PS1='\u@\h [ \w ] \$ ' The other distro again? Really, none of these changes make bashrc more sane - most of them might be convenient for you, in which case you can change it locally just fine.
Comment on attachment 371444 [details, diff] bash_logout.patch >--- bash_logout 2014-02-28 07:18:37.916750638 -0500 >+++ bash_logout.sane 2014-02-28 07:13:01.419983629 -0500 >@@ -3,7 +3,7 @@ > # This file is sourced when a login shell terminates. > > # You may wish to clear everyone's screen when they logout. >-#clear >+clear The distro default isn't satisfactory?
to ping with out limitation $unalias ping $ping whoever.com sudo is for sudo tab completion, sudo will become more important in a bit in gentoo. -i ask before doing potentially damaging file operations. yes you want emerge to ask by default, and do nothing unless explicitly told y Y yes or YES.... clear? mysql is known to leave plaintext passwords in consoles. im sure there are others. the ps1 W to w is not a mistake and is a legitimate bug in the current bashrc resulting in incomplete path output. >- PS1='\[\033[01;31m\]\h\ >+ PS1='\[\e[01;31m\]\u@\h\ results in "localhost" instead of "root@localhost" they may be convenient to production server admins, vps defaults, new users etc.... ps1 mirrors LFS but thats just personal preference, the others should be addressed. just because you don't notice that its broken does not mean its not.
i might add the \u option to the default PS1, but Jeroen is 100% right about the rest -- they have no business being anywhere near distro-wide defaults.
(In reply to SpanKY from comment #6) > i might add the \u option to the default PS1, but Jeroen is 100% right about > the rest -- they have no business being anywhere near distro-wide defaults. W to w.... see funtoo duplicate bug. http://bugs.funtoo.org/browse/FL-1120 this is 100% my PRIMARY problem with the distro wide bashrc.......
(In reply to three sixes from comment #7) no idea what you're talking about. your response (and that linked bug) contain no real details beyond what you've already provided here. simply because your personal choice of default settings doesn't line up with everyone else in the world doesn't mean everyone else in the world is doing it wrong.