Mercurial > ec-dotfiles
comparison rc/bash @ 271:003b0c8870b3
As it turns out who am i doesn't respect current actual user. Replaced with ancient but better version. Either LOGNAME or USER. Whichever has value.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Thu, 24 Nov 2011 15:23:18 +0700 |
parents | 0e41725e7d38 |
children | 53bbc9673f87 cf23a637f3a5 |
comparison
equal
deleted
inserted
replaced
270:0e41725e7d38 | 271:003b0c8870b3 |
---|---|
133 fi | 133 fi |
134 done | 134 done |
135 | 135 |
136 case "${TERM}" in | 136 case "${TERM}" in |
137 xterm*|screen*|dtterm*) | 137 xterm*|screen*|dtterm*) |
138 PROMPT_COMMAND='echo -ne "\033]0;'"$(who am i | cut -d ' ' -f 1)@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}" | 138 PROMPT_COMMAND='echo -ne "\033]0;'"${USER:-$LOGNAME}@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}" |
139 PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[1;34m\]\W\[\e[0m\]]\$ ' | 139 PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[1;34m\]\W\[\e[0m\]]\$ ' |
140 ;; | 140 ;; |
141 *) | 141 *) |
142 PS1='[\u@\h \W]\$ ' | 142 PS1='[\u@\h \W]\$ ' |
143 ;; | 143 ;; |