chiark / gitweb /
dot/shell-rc: Don't expand `TERM' or `INSIDE_EMACS' if they're not defined.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 11 May 2018 19:15:36 +0000 (20:15 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 11 May 2018 19:39:07 +0000 (20:39 +0100)
dot/shell-rc

index 4ab03557bc5c1ca8c8079f7505b35325c81ddad2..fef62a2aa60d483850245b1c83861358d2e1dd92 100644 (file)
@@ -74,7 +74,7 @@ __mdw_set_prompt_pieces () {
 }
 
 __mdw_set_prompt () {
-  case "$TERM:$INSIDE_EMACS" in
+  case "${TERM-dumb}:${INSIDE_EMACS+$INSIDE_EMACS}" in
     dumb:)
       case $(id -u) in 0) PS1='# ' ;; *) PS1='$ ' ;; esac
       PS2='> '