diff --git a/zoxide.plugin.zsh b/zoxide.plugin.zsh index ead1fb2..ef25c32 100644 --- a/zoxide.plugin.zsh +++ b/zoxide.plugin.zsh @@ -4,7 +4,9 @@ _zoxide_precmd() { zoxide add } -precmd_functions+=_zoxide_precmd +[[ -n "${precmd_functions[(r)_zoxide_precmd]}" ]] || { + precmd_functions+=_zoxide_precmd +} z() { if [ $# -ne 0 ]; then