more snippets based on the old ones
change envvars to FZF_ALT_C... for the cd one and ..._CTRL_T... for the xdg-open one to make it work with the original file.
# CTRL-O Open files with xsg-open
fzf-xdg-open() {
setopt localoptions pipefail no_aliases 2> /dev/null
local item
FZF_CTRL_F_COMMAND=$(
if [[ "$(realpath .)" == "${HOME}" ]]; then
printf '%s' "fd . --color=always -HiL -t f -d1 -E .git -E .gitignore"
else
printf '%s' "fd . --color=always -HiL -t f -d2 -E .git -E .gitignore"
fi
)
FZF_DEFAULT_COMMAND=${FZF_CTRL_F_COMMAND:-} \
xdg-open $(eval ${FZF_CTRL_F_COMMAND} | fzf -d / --preview='fzf_preview_wrapper {}' )
Comment too long. Click here to view the full text.