Instead of excluding or pruning all the directories except those I want to search through, I used the --search-path
option to supply those directories; no need to exclude anything. Here's the configuration (in my zshenv
):
# fzf
export CONFIGURATION="--search-path $HOME/.config --search-path $HOME/downloads --search-path $HOME/google_drive --search-path /etc"
export FZF_DEFAULT_COMMAND="fd --type f --hidden --follow $CONFIGURATION . "
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="fd --type d --hidden --follow $CONFIGURATION . "
_fzf_compgen_path() {
fd --hidden --follow "$CONFIGURATION" .
}
_fzf_compgen_dir() {
fd --type d --hidden --follow "$CONFIGURATION" .
}
fd
already filter the results, instead offzf
? Do you want to use both to filter the results?fzf
s filtering can potentially return more results thanfd
due to being a fuzzy filter. Do you accept that already filtering infd
would return less results?