changeset 178:da329720ff18

zsh prompt: add urxvt to whitelisted terms, use a loop instead of many ifs
author Augie Fackler <durin42@gmail.com>
date Wed, 13 Jan 2010 10:28:44 -0600
parents 70dcdb2acade
children ebbbf3567a0e
files .shell.d/99.prompt.zsh
diffstat 1 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/.shell.d/99.prompt.zsh
+++ b/.shell.d/99.prompt.zsh
@@ -45,13 +45,18 @@ else
     RPS1=$'[$rps_branch]%(?..%{\e[1;33m%} %?%{\e[0m%})'
 fi
 
-if [ "$TERM" = "rxvt" ] || [ "$TERM" = "xterm" ] \
-  || [ "$TERM" = "xterm-color" ] || [ "$TERM" = "screen" ]; then
-	export FANCYTYPE="YES"
-else
-	export FANCYTYPE="NO"
-	prompt='[%m:%3~] %n%# '
-	RPS1=$'[%W %t]'
+
+export FANCYTYPE="NO"
+
+for ok in rxvt rxvt-unicode xterm xterm-color screen ; do
+    if [ "$TERM" = "$ok" ] ; then
+        export FANCYTYPE="YES"
+    fi
+done
+
+if [ $FANCYTYPE = "NO" ] ; then
+    prompt='[%m:%3~] %n%# '
+    RPS1=$'[%W %t]'
 fi
 
 #nonfancy no-frills prompt - disabled (same as the "non-fancy" one above)