-
running Arch Linux, use bash shell.
version, config info: $ pacman -Qs fzf
local/fzf 0.46.1-1
Command-line fuzzy finder
$ rg fzf .bashrc
25:# fzf : A command-line fuzzy finder
26:[ -f "$HOME"/.config/bash/fzf.sh ] && source "$HOME"/.config/bash/fzf.sh
$ cat .config/bash/fzf.sh
export FZF_DEFAULT_COMMAND='fd --type file --hidden --ignore --follow'
export FZF_DEFAULT_OPTS='--height 60% --layout=reverse --border'
export FZF_COMPLETION_TRIGGER='\' # \ is my trigger key
export fzf_preview_cmd='[[ $(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --color=always --line-range 0:200 {}) 2> /dev/null'
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
export FZF_CTRL_T_OPTS="--preview '${fzf_preview_cmd}'"
export FZF_ALT_C_COMMAND='fd --type directory --hidden --ignore --follow'
[ -f /usr/share/fzf/key-bindings.bash ] && source /usr/share/fzf/key-bindings.bash
[ -f /usr/share/fzf/completion.bash ] && source /usr/share/fzf/completion.bash
$ head -n 30 .config/fd/ignore
# .fdignore
#
# Files matching these patterns will not be searched by default when using `fd`
# To override these settings use the appropriate flag below:
# --no-ignore : don't respect .ignore, .gitignore, .fdignore
# --no-ignore-vcs : don't respect .ignore files
.cache/
.dotfiles/
.git/
.java/
.mozilla/
.pki/
.vmware/
.vscode-server/
.vscode/
*.bak
*.sha1
flatpak/
# Heroic Games Launcher
Games/
# wine
.local/share/wineprefixes/
.wine/
# Steam Path
.local/share/Steam/
.steam/
term-record.mp4Is there something wrong with my configuration? how let |
Beta Was this translation helpful? Give feedback.
Answered by
junegunn
Feb 15, 2024
Replies: 1 comment
-
Fuzzy completion uses |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
test482
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fuzzy completion uses
_fzf_compgen_path
function. If you wonder why we need a different way of configuring it, see: