config(zsh): custom fzf

main
sudo pacman -Syu 2024-01-24 00:05:57 +07:00
parent c6c1f6aa04
commit c27e4af7de
1 changed files with 14 additions and 3 deletions

View File

@ -23,14 +23,25 @@ export PATH=$PATH:$GOPATH/bin
# fzf
# https://github.com/junegunn/fzf
if command -v fzf &>/dev/null; then
export FZF_COMPLETION_TRIGGER='~~'
if command -v fd &>/dev/null; then
export FZF_DEFAULT_COMMAND="fd --type file"
_fzf_compgen_path() {
fd --type file . "$1"
}
_fzf_compgen_dir() {
fd --type directory . "$1"
}
export FZF_DEFAULT_COMMAND="fd --type file --color=always"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="fd --type directory"
export FZF_ALT_C_COMMAND="fd --type directory --color=always"
fi
# https://github.com/catppuccin/fzf
export FZF_DEFAULT_OPTS="\
--ansi \
--pointer='🔫' --prompt='🪓 ' \
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8"