From 0fbf90b2429950898670ad76f0c99c526bc22c51 Mon Sep 17 00:00:00 2001 From: Thomas Connell Date: Thu, 23 Oct 2014 13:31:35 -0600 Subject: [PATCH] Add the environment variable DISABLE_CMD_AUTO_TITLE for those that only want to see pwd in their titles. --- lib/termsupport.zsh | 3 +++ templates/zshrc.zsh-template | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 9d6681603..f977d584e 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -24,6 +24,9 @@ function omz_termsupport_precmd { #Appears at the beginning of (and during) of command execution function omz_termsupport_preexec { + if [[ "$DISABLE_CMD_AUTO_TITLE" == "true" ]]; then + return + fi emulate -L zsh setopt extended_glob diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index a12eca2a0..e57356b37 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -19,9 +19,12 @@ ZSH_THEME="robbyrussell" # Uncomment the following line to disable colors in ls. # DISABLE_LS_COLORS="true" -# Uncomment the following line to disable auto-setting terminal title. +# Uncomment the following line to disable auto-setting terminal title in any way. # DISABLE_AUTO_TITLE="true" +# Uncomment the following line to disable auto-setting running commands in the terminal title. +# DISABLE_CMD_AUTO_TITLE="true" + # Uncomment the following line to enable command auto-correction. # ENABLE_CORRECTION="true"