Rather than running `id' every time. What was I thinking?
: ${USER-${LOGNAME-$(id -un)}}
__mdw_user=$USER
+case $(id -u) in
+ 0) __mdw_rootp=t ;;
+ *) __mdw_rootp=nil ;;
+esac
+
__mdw_set_prompt_pieces () {
## Fancy highlighting in some terminals.
## highlight when I'm running as some other user. Highlight when this
## isn't the outermost shell on the terminal.
local left right u tty
- case $(id -u) in
- 0)
+ case $__mdw_rootp in
+ t)
left=$(echo « | iconv -f UTF-8 -t //translit)
right=$(echo » | iconv -f UTF-8 -t //translit)
;;
- *)
+ nil)
case $USER in
mdw | mwooding | nemo) u="" left="[" right="]" ;;
*) u="$__mdw_user@" left="{" right="}" ;;