diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2019-11-21 09:04:33 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2019-11-21 09:04:33 -0700 |
commit | 9c851a9b820a70b8d23dee0b51220d009e749cec (patch) | |
tree | c753688ce9392dc24043cb2f3072d0fec9faab7c /lib | |
parent | 1ffd2849fc056dced0c80a9ed8905f29ff9827a5 (diff) | |
parent | 1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd (diff) | |
download | zsh-9c851a9b820a70b8d23dee0b51220d009e749cec.tar.gz zsh-9c851a9b820a70b8d23dee0b51220d009e749cec.tar.bz2 zsh-9c851a9b820a70b8d23dee0b51220d009e749cec.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'lib')
-rw-r--r-- | lib/termsupport.zsh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index aa14f3f07..f5e367fcb 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -75,8 +75,9 @@ function omz_termsupport_preexec { title '$CMD' '%100>...>$LINE%<<' } -precmd_functions+=(omz_termsupport_precmd) -preexec_functions+=(omz_termsupport_preexec) +autoload -U add-zsh-hook +add-zsh-hook precmd omz_termsupport_precmd +add-zsh-hook preexec omz_termsupport_preexec # Keep Apple Terminal.app's current working directory updated @@ -99,7 +100,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then } # Use a precmd hook instead of a chpwd hook to avoid contaminating output - precmd_functions+=(update_terminalapp_cwd) + add-zsh-hook precmd update_terminalapp_cwd # Run once to get initial cwd set update_terminalapp_cwd fi |