From a5e83d2611186f7f9e176809c28d031cf17cb68e Mon Sep 17 00:00:00 2001 From: shokinn Date: Tue, 29 Jul 2025 10:52:02 +0200 Subject: [PATCH 1/3] Add zoxide plugin to zsh configuration --- dotfiles/zshrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index dd8ab31..fae2b13 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -103,6 +103,7 @@ plugins=( themes uv vscode + zoxide zsh-navigation-tools zsh-ssh {%@@ if distro == 'macos' @@%} # Mac specifics @@ -210,5 +211,3 @@ autoload -Uz compinit zstyle ':completion:*' menu select fpath+=~/.zfunc {%@@ endif @@%} - -[[ $(command -v zoxide) ]] && eval "$(zoxide init zsh)" From 8c0226d77137426314206325f766b9adaea469cf Mon Sep 17 00:00:00 2001 From: shokinn Date: Tue, 29 Jul 2025 10:55:37 +0200 Subject: [PATCH 2/3] Add zoxide command override for easier directory navigation --- dotfiles/zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index fae2b13..facef7c 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -72,6 +72,9 @@ COMPLETION_WAITING_DOTS="true" # Would you like to use another custom folder than $ZSH/custom? # ZSH_CUSTOM=/path/to/new-custom-folder +# set zoxide command to cd +ZOXIDE_CMD_OVERRIDE="cd" + # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) From ef285f1105d724291d4fa632e3b6b4564d14db74 Mon Sep 17 00:00:00 2001 From: shokinn Date: Tue, 29 Jul 2025 11:05:00 +0200 Subject: [PATCH 3/3] Add default z zoxide functions --- dotfiles/commonfunc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dotfiles/commonfunc b/dotfiles/commonfunc index 3376bf9..822e760 100644 --- a/dotfiles/commonfunc +++ b/dotfiles/commonfunc @@ -139,6 +139,15 @@ EOF fi } +# zoxide z functions, since my default zoxide init will overwrite the cd command +z () { + __zoxide_z "$@" +} + +zi () { + __zoxide_zi "$@" +} + {%@@ if distro == 'macos' @@%} ####################################### # Shows a netstat -tulpn styled output on mac. @@ -432,4 +441,4 @@ setVpnGitRemote() { echo -e "🔗 git remote (${HIGHLIGHT}${ORIGIN}${RESET}): ${HIGHLIGHT}${repo}${RESET}\n" } -{%@@ endif @@%} \ No newline at end of file +{%@@ endif @@%}