use fd with fzf, usd fzf for fasd

main
Alpha Chen 2 years ago
parent b1e67ce482
commit 086cb046d9
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -52,9 +52,9 @@ fi
if [ $commands[fzf] ]; then
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
# export FZF_DEFAULT_COMMAND="rg"
# export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# export FZF_ALT_C_COMMAND="find . -type d"
export FZF_DEFAULT_COMMAND="fd --type f"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="fd --type d"
# alias fzf=fzf-tmux
# https://github.com/junegunn/fzf/issues/164#issuecomment-581837757
@ -140,6 +140,16 @@ if [ $commands[fzf] ]; then
}
bind-git-helper f b t r h s
unset -f bind-git-helper
if [ $commands[fasd] ]; then
# https://github.com/junegunn/fzf/wiki/examples#with-fasd-1
fasd_fzf() {
local dir
dir="$(fasd -Rds "$1" | fzf -1 -0 --no-sort +m | awk '{print $2}')" && cd "${dir}" || return 1
}
alias j=fasd_fzf # override prezto's fasd integration
fi
fi
if [ $commands[exa] ]; then

Loading…
Cancel
Save