Mercurial > ec-dotfiles
comparison rc/bashrc @ 584:4130d41c6acb
Support for msys' USERNAME variable
author | nanaya <me@myconan.net> |
---|---|
date | Wed, 09 Mar 2016 15:37:53 +0900 |
parents | 3e051a850ecf |
children | 394f19c180a2 |
comparison
equal
deleted
inserted
replaced
583:0d928126fcf6 | 584:4130d41c6acb |
---|---|
231 done | 231 done |
232 | 232 |
233 PS1='\u@\h:\w\$ ' | 233 PS1='\u@\h:\w\$ ' |
234 case "${TERM}" in | 234 case "${TERM}" in |
235 xterm*|screen*|dtterm*) | 235 xterm*|screen*|dtterm*) |
236 PROMPT_COMMAND='echo -ne "\033]0;'"${USER:-$LOGNAME}@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}" | 236 PROMPT_COMMAND='echo -ne "\033]0;'"${USER:-${LOGNAME:-$USERNAME}}@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}" |
237 if [ "$(id -u)" = "0" ]; then | 237 if [ "$(id -u)" = "0" ]; then |
238 PS1='\[\e[1;31m\]\u@\h:\w\$\[\e[0m\] ' | 238 PS1='\[\e[1;31m\]\u@\h:\w\$\[\e[0m\] ' |
239 elif [ "$(uname)" != "DragonFly" ]; then | 239 elif [ "$(uname)" != "DragonFly" ]; then |
240 # DragonFly's Bash is a bit buggy. | 240 # DragonFly's Bash is a bit buggy. |
241 PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;36m\]\w\[\e[0m\]\$ ' | 241 PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;36m\]\w\[\e[0m\]\$ ' |