[Fix #163] Selectively set terminal title in preexec
Apple Terminal will now reset the terminal title after a command has finished executing.
This commit is contained in:
parent
e541283126
commit
a438b146fe
@ -102,7 +102,9 @@ add-zsh-hook precmd set-title-precmd
|
|||||||
# Sets the tab and window titles before command execution.
|
# Sets the tab and window titles before command execution.
|
||||||
function set-title-preexec {
|
function set-title-preexec {
|
||||||
if zstyle -t ':omz:module:terminal' auto-title; then
|
if zstyle -t ':omz:module:terminal' auto-title; then
|
||||||
set-title-by-command "$2"
|
if [[ "$TERM_PROGRAM" != 'Apple_Terminal' ]]; then
|
||||||
|
set-title-by-command "$2"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
add-zsh-hook preexec set-title-preexec
|
add-zsh-hook preexec set-title-preexec
|
||||||
|
Reference in New Issue
Block a user