chiark / gitweb /
dot/shell-rc: Use `$USER' directly now that I've set it properly.
[profile] / dot / shell-rc
index 9ba034156c142b9f70399243f3666bd8bf26556e..bec48d4ec78622cf5dd9b3cc6a3876ed384d7633 100644 (file)
@@ -80,17 +80,16 @@ __mdw_set_prompt_pieces () {
   ## Choose the right delimiters.  Highlight root prompts specially;
   ## highlight when I'm running as some other user.  Highlight when this
   ## isn't the outermost shell on the terminal.
-  local left right user u tty
-  user=${USER-${LOGNAME-$(id -un)}}
+  local left right u tty
   case $(id -u) in
     0)
       left=$(echo « | iconv -f UTF-8 -t //translit)
       right=$(echo » | iconv -f UTF-8 -t //translit)
       ;;
     *)
-      case $user in
+      case $USER in
        mdw | mwooding | nemo) u="" left="[" right="]" ;;
-       *) u="$user@" left="{" right="}" ;;
+       *) u="$USER@" left="{" right="}" ;;
       esac
       tty=$(tty)
       case "$__mdw_tty" in