Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Introduce DISABLE_AUTO_TITLE option

  • Loading branch information...
commit 06063ab695ecfe6fa7737511a070b24412ee1b2a 1 parent 52df854
@lorrin lorrin authored
Showing with 10 additions and 3 deletions.
  1. +7 −3 lib/termsupport.zsh
  2. +3 −0  templates/zshrc.zsh-template
View
10 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
}
View
3  templates/zshrc.zsh-template
@@ -14,6 +14,9 @@ export ZSH_THEME="robbyrussell"
# Uncomment following line if you want to disable colors in ls
# export DISABLE_LS_COLORS="true"
+# Uncomment following line if you want to disable autosetting terminal title.
+# export DISABLE_AUTO_TITLE="true"
+
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
Please sign in to comment.
Something went wrong with that request. Please try again.