Implemented using recommended pattern matching.

This commit is contained in:
Christopher Chow 2010-11-11 09:05:44 +11:00
commit ee216476cc

View file

@ -5,7 +5,7 @@ function title {
print -nR $'\033k'$1$'\033'\\\ print -nR $'\033k'$1$'\033'\\\
print -nR $'\033]0;'$2$'\a' print -nR $'\033]0;'$2$'\a'
elif [[ ($TERM == "^xterm") ]] || [[ ($TERM == "rxvt") ]]; then elif [[ $TERM == xterm* || $TERM == rxvt* ]]; then
# Use this one instead for XTerms: # Use this one instead for XTerms:
print -nR $'\033]0;'$*$'\a' print -nR $'\033]0;'$*$'\a'
fi fi