From e17f06eaca8c49ff85e953f6388fc05b9ac8b149 Mon Sep 17 00:00:00 2001 From: Leander Scherer Date: Tue, 13 Jan 2026 00:31:15 +0100 Subject: feat(zsh): setup auto cd, cd complete --- modules/home/shells/zsh/default.nix | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'modules/home/shells/zsh') diff --git a/modules/home/shells/zsh/default.nix b/modules/home/shells/zsh/default.nix index 72d3f9a..5da67c9 100644 --- a/modules/home/shells/zsh/default.nix +++ b/modules/home/shells/zsh/default.nix @@ -25,23 +25,29 @@ in autosuggestion.enable = true; syntaxHighlighting.enable = true; initContent = '' - # view man pages with nvim - export MANPAGER="nvim +Man!" + # view man pages with nvim + export MANPAGER="nvim +Man!" - # Directory completion with trailing slash - zstyle ':completion:*' list-dirs-first true - zstyle ':completion:*' special-dirs true - zstyle ':completion:*' squeeze-slashes true - zstyle ':completion:*' add-space false + # Directory completion with trailing slash + zstyle ':completion:*' list-dirs-first true + zstyle ':completion:*' special-dirs true + zstyle ':completion:*' squeeze-slashes true + zstyle ':completion:*' add-space false - # Case-insensitive completion - zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' - # vim keybindings - bindkey -v + # Case-insensitive completion + zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' + # vim keybindings + bindkey -v - # zoxide smarter cmd command - eval "$(zoxide init zsh)" - ''; + # Auto cd - type directory name to cd into it + setopt AUTO_CD + + # Complete .. to ../ for directory navigation + setopt AUTO_PARAM_SLASH + + # zoxide smarter cmd command + eval "$(zoxide init zsh)" + ''; shellAliases = { ls = "ls --color=auto"; }; -- cgit v1.3.1