05fc020a081846245a5a4a26d190652cb8cf9add

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge branch 'disable_auto-title' of https://github.com/lorrin/oh-my-zsh into lorrin-disable_auto-title

Diff

 1diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
 2index e1e536690be580eb0c99a1df47ad5b3df9494073..b250833ed66c7d886cf68e1a26ab9ea0e1004b7e 100644
 3--- a/lib/termsupport.zsh
 4+++ b/lib/termsupport.zsh
 5@@ -16,11 +16,15 @@ ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~"
 6 
 7 #Appears when you have the prompt
 8 function precmd {
 9-  title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE
10+  if [ "$DISABLE_AUTO_TITLE" != "true" ]; then
11+    title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE
12+  fi
13 }
14 
15 #Appears at the beginning of (and during) of command execution
16 function preexec {
17-  local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd
18-  title "$CMD" "%100>...>$2%<<"
19+  if [ "$DISABLE_AUTO_TITLE" != "true" ]; then
20+    local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd
21+    title "$CMD" "%100>...>$2%<<"
22+  fi
23 }
24diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
25index 8022b35068697ee2b02ec46536bbfce68c976445..506daa9a2489c0ac7a107d4f7f96ff320717b9af 100644
26--- a/templates/zshrc.zsh-template
27+++ b/templates/zshrc.zsh-template
28@@ -14,6 +14,9 @@ export ZSH_THEME="robbyrussell"
29 # Uncomment following line if you want to disable colors in ls
30 # export DISABLE_LS_COLORS="true"
31 
32+# Uncomment following line if you want to disable autosetting terminal title.
33+# export DISABLE_AUTO_TITLE="true"
34+
35 # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
36 # Example format: plugins=(rails git textmate ruby lighthouse)
37 plugins=(git)