X-Git-Url: https://arthur.barton.de/gitweb/?p=ConfigScripts.git;a=blobdiff_plain;f=sys%2Fbashrc;fp=sys%2Fbashrc;h=ce98922e21e8686a42e46e586a65fbbf6c9dc1ba;hp=2e81d0a49ea27ac3e1237c444eb495bd6f2765d6;hb=061a72a767b36d16188639ca8ccb2d1f41a11409;hpb=bc85dd687f594956dd77348696af49e2efee9a41 diff --git a/sys/bashrc b/sys/bashrc index 2e81d0a..ce98922 100644 --- a/sys/bashrc +++ b/sys/bashrc @@ -1,6 +1,6 @@ # # /etc/bash.bashrc: System-wide rc file for interactive bash(1) shells. -# Written 2003-2013 by Alexander Barton (alex@barton.de) +# Written 2003-2014 by Alexander Barton (alex@barton.de) # [ -e ~/.ConfigScripts.debug ] && echo " >> /etc/bash.bashrc ..." @@ -108,14 +108,14 @@ PS1_Path() { } PS1="${COLOR_PREPOSTTXT}${PS1_BEGIN:-<}" -[ "$UID" -eq 0 ] \ +[ "$LOGNAME" = "root" ] \ || PS1="${PS1}${COLOR_USER}\u${COLOR_AT}@" PS1="${PS1}${COLOR_HOST}\h" PS1="${PS1}${COLOR_COLON}:" PS1="${PS1}${COLOR_PATH}\$(PS1_Path) " PS1="${PS1}${COLOR_HISTORY}\!" PS1="${PS1}${COLOR_PREPOSTTXT}${PS1_END:->}${COLOR_RESET} " -[ "$UID" -eq 0 ] \ +[ "$LOGNAME" = "root" ] \ && PS1="${PS1}${COLOR_PROMPT_ROOT}\\\$${COLOR_RESET} " \ || PS1="${PS1}${COLOR_PROMPT_USER}\\\$${COLOR_RESET} " [ "$(type -t __git_ps1)" ] \ @@ -175,7 +175,7 @@ fi # If this is an xterm set the title to user@host:dir case $TERM in xterm*|rxvt|screen) - PROMPT_COMMAND='printf "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' + PROMPT_COMMAND='printf "\033]0;${LOGNAME}@${HOSTNAME}: ${PWD}\007"' ;; *) ;;