From 0ab3b8f3b682375ddb955915dd056d6155f71377 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Wed, 28 Jan 2026 20:43:53 +0100 Subject: [PATCH] remove cd complete function --- modules/zsh.nix | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/modules/zsh.nix b/modules/zsh.nix index 2c47c71..a7f1ac3 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -128,22 +128,6 @@ in "thunar \"$current_dir\" &"} } - # Custom cd completion with fzf (only for empty cd command) - function _fzf_cd_complete() { - local tokens=(''${(z)LBUFFER}) - if [[ ''${tokens[1]} == "cd" && -z ''${tokens[2]} ]]; then - local selected - selected=$(fd --type d --max-depth 1 2>/dev/null | fzf --height 40% --preview 'ls -la {}' --header="Select directory") - if [[ -n "$selected" ]]; then - LBUFFER="cd \"$selected\"" - fi - zle redisplay - else - zle expand-or-complete - fi - } - zle -N _fzf_cd_complete - bindkey '^I' _fzf_cd_complete ''; };