diff --git a/zsh/zoxide.zsh b/zsh/zoxide.zsh index bf68c3a..27a3ca9 100644 --- a/zsh/zoxide.zsh +++ b/zsh/zoxide.zsh @@ -6,6 +6,10 @@ if command-exists zoxide; then cached-eval "$(command-path zoxide)" zoxide init --cmd zox zsh # Use functions to allow regular zsh completion for cd to work. - cd() { __zoxide_z "$@"; } - alias cdi='__zoxide_zi' + if command-exists __zoxide_z; then + cd() { __zoxide_z "$@"; } + fi + if command-exists __zoxide_zi; then + alias cdi='__zoxide_zi' + fi fi