chiark
/
gitweb
/
~mdw
/
profile
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bashrc, emacs, dot-emacs.el: Fix prompts for unusual user names.
[profile]
/
bashrc
diff --git
a/bashrc
b/bashrc
index aa184cee16e65ef5bbd244d398126e9b3de85ece..6fb97f45c2ba6d53b719317d74bdc48d58660579 100644
(file)
--- a/
bashrc
+++ b/
bashrc
@@
-30,11
+30,20
@@
if [ -t 0 ]; then
if (( EUID == 0 )); then
left="«" right="»"
if (( EUID == 0 )); then
left="«" right="»"
- elif [ "$__mdw_tty" = "`tty`" ]; then
- left="<" right=">"
else
else
- left="[" right="]"
- export __mdw_tty="`tty`"
+ case $USER in
+ mdw|mwooding)
+ u="" left="[" right="]"
+ ;;
+ *)
+ u="\\u@" left="{" right="}"
+ ;;
+ esac
+ if [ "$__mdw_tty" = "`tty`" ]; then
+ left="<" right=">"
+ else
+ export __mdw_tty="`tty`"
+ fi
fi
if [ -z "$SSH_CLIENT" ] &&
fi
if [ -z "$SSH_CLIENT" ] &&
@@
-43,7
+52,7
@@
if [ -t 0 ]; then
sec_l='(' sec_r=')'
fi
sec_l='(' sec_r=')'
fi
- PS1="$nl$bold$left$sec_l\\h$sec_r \\w$right$unbold"
+ PS1="$nl$bold$left$sec_l
$u
\\h$sec_r \\w$right$unbold"
PS2="$PS1 $bold>$unbold "
fi
PS2="$PS1 $bold>$unbold "
fi