Prevent duplicate hooks in termsupport.zsh when reloading config
This commit is contained in:
parent
291e96dcd0
commit
0b3ba4fd4c
@ -75,8 +75,9 @@ function omz_termsupport_preexec {
|
|||||||
title '$CMD' '%100>...>$LINE%<<'
|
title '$CMD' '%100>...>$LINE%<<'
|
||||||
}
|
}
|
||||||
|
|
||||||
precmd_functions+=(omz_termsupport_precmd)
|
autoload -U add-zsh-hook
|
||||||
preexec_functions+=(omz_termsupport_preexec)
|
add-zsh-hook precmd omz_termsupport_precmd
|
||||||
|
add-zsh-hook preexec omz_termsupport_preexec
|
||||||
|
|
||||||
|
|
||||||
# Keep Apple Terminal.app's current working directory updated
|
# 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
|
# 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
|
# Run once to get initial cwd set
|
||||||
update_terminalapp_cwd
|
update_terminalapp_cwd
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user