# HG changeset patch # User Augie Fackler # Date 1263400124 21600 # Node ID da329720ff189d2c2227b6a6a65e03a4fe5afe8c # Parent 70dcdb2acadee4f2e8b0b60d1335c493db13fa48 zsh prompt: add urxvt to whitelisted terms, use a loop instead of many ifs diff --git a/.shell.d/99.prompt.zsh b/.shell.d/99.prompt.zsh --- 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)