d807221f607cc7ef02e17a9aa60b1f5f18a886ab

Author
Fredrik Appelberg <fredrik.appelberg@gmail.com>
Committer
Fredrik Appelberg <fredrik.appelberg@gmail.com>
Date

Message

fix to avoid parse errors if $TERM is empty

Diff

 1diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
 2index e1e536690be580eb0c99a1df47ad5b3df9494073..d7c2b9def8967bb9b9451b1f7eced2346a4d4203 100644
 3--- a/lib/termsupport.zsh
 4+++ b/lib/termsupport.zsh
 5@@ -5,7 +5,7 @@
 6 function title {
 7   if [[ "$TERM" == "screen" ]]; then 
 8     print -Pn "\ek$1\e\\" #set screen hardstatus, usually truncated at 20 chars
 9-  elif [[ ($TERM =~ "^xterm") ]] || [[ ($TERM == "rxvt") ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
10+  elif [[ ("$TERM" =~ "^xterm") ]] || [[ ("$TERM" == "rxvt") ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
11     print -Pn "\e]2;$2\a" #set window name
12     print -Pn "\e]1;$1\a" #set icon (=tab) name (will override window name on broken terminal)
13   fi