From af12c6c83617d244df9cf7fc09ed1d564bec94cd Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Fri, 16 Jan 2026 11:17:51 +0100 Subject: [PATCH] ignore hidden files/dirs in search --- modules/zsh.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/zsh.nix b/modules/zsh.nix index b6493ca..f0d1bf1 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -93,7 +93,7 @@ function cdf() { local search_dir="''${1:-~}" local target - target=$(echo "" | fzf --bind "change:reload:fd --hidden --follow --exclude .git {q} ''$search_dir 2>/dev/null || true" --header="Type to search, Enter to cd" --preview '([[ -d {} ]] && ls -la {}) || ([[ -f {} ]] && head -20 {})' --height 40% --ansi) + target=$(echo "" | fzf --bind "change:reload:fd --follow {q} ''$search_dir 2>/dev/null || true" --header="Type to search, Enter to cd" --preview '([[ -d {} ]] && ls -la {}) || ([[ -f {} ]] && head -20 {})' --height 40% --ansi) if [[ -n "$target" ]]; then [[ -d "$target" ]] && cd "$target" || cd "$(dirname "$target")" fi @@ -103,7 +103,7 @@ function pwdf() { local search_dir="''${1:-~}" local target - target=$(echo "" | fzf --bind "change:reload:fd --hidden --follow --exclude .git {q} ''$search_dir 2>/dev/null || true" --header="Type to search, Enter to print path" --preview '([[ -d {} ]] && ls -la {}) || ([[ -f {} ]] && head -20 {})' --height 40% --ansi) + target=$(echo "" | fzf --bind "change:reload:fd --follow {q} ''$search_dir 2>/dev/null || true" --header="Type to search, Enter to print path" --preview '([[ -d {} ]] && ls -la {}) || ([[ -f {} ]] && head -20 {})' --height 40% --ansi) if [[ -n "$target" ]]; then echo "$target" fi