diff options
author | Lorrin Nelson <lhn_github@nerdylorrin.net> | 2011-03-23 21:20:08 -0700 |
---|---|---|
committer | Lorrin Nelson <lhn_github@nerdylorrin.net> | 2011-03-23 21:20:08 -0700 |
commit | 06063ab695ecfe6fa7737511a070b24412ee1b2a (patch) | |
tree | 202def8dbf182839a0c41fbdbae4d0b1250a4bfb /lib/termsupport.zsh | |
parent | 52df85440ee8ead8f17d3aa3e1fedf187162313c (diff) | |
download | zsh-06063ab695ecfe6fa7737511a070b24412ee1b2a.tar.gz zsh-06063ab695ecfe6fa7737511a070b24412ee1b2a.tar.bz2 zsh-06063ab695ecfe6fa7737511a070b24412ee1b2a.zip |
Introduce DISABLE_AUTO_TITLE option
Diffstat (limited to 'lib/termsupport.zsh')
-rw-r--r-- | lib/termsupport.zsh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index e1e536690..b250833ed 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -16,11 +16,15 @@ ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~" #Appears when you have the prompt function precmd { - title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE + if [ "$DISABLE_AUTO_TITLE" != "true" ]; then + title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE + fi } #Appears at the beginning of (and during) of command execution function preexec { - local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd - title "$CMD" "%100>...>$2%<<" + if [ "$DISABLE_AUTO_TITLE" != "true" ]; then + local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd + title "$CMD" "%100>...>$2%<<" + fi } |