From 854eafde2646d7e0137b3e0af480743e13456786 Mon Sep 17 00:00:00 2001 From: Napsack Builder Date: Mon, 30 Jun 2025 09:36:41 -0400 Subject: [PATCH] Make sure zoxide is setup before using it for `cd` --- .config/zsh/zoxide.zsh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.config/zsh/zoxide.zsh b/.config/zsh/zoxide.zsh index 786b78c..a50e32c 100644 --- a/.config/zsh/zoxide.zsh +++ b/.config/zsh/zoxide.zsh @@ -1 +1,8 @@ -alias cd=z +# alias cd=z +cd() { + if whence -w z >/dev/null 2>&1; then # Does a command called 'z' exist right now? + z "$@" # use it + else + builtin cd "$@" # quiet fallback + fi +}