Changed dependency from fzf to fzy

This commit is contained in:
Eric Torres 2018-11-09 20:06:11 -08:00
parent 0731eb86a2
commit b1d73da2bf

View File

@ -2,7 +2,7 @@
# edit - fuzzy find a file and edit it # edit - fuzzy find a file and edit it
# Dependencies # Dependencies
# - fd # - fd
# - fzf # - fzy
printHelp() { printHelp() {
cat << EOF cat << EOF
@ -30,7 +30,6 @@ editor=
declare -a fd_opts declare -a fd_opts
fd_opts+=('--hidden') fd_opts+=('--hidden')
fd_opts+=('--type' 'f') fd_opts+=('--type' 'f')
fd_opts+=('--print0')
fd_opts+=('--no-ignore-vcs') fd_opts+=('--no-ignore-vcs')
while true; do while true; do
@ -111,9 +110,9 @@ if [[ -z "${editor:-${EDITOR}}" ]]; then
fi fi
if [[ "${dir}" ]]; then if [[ "${dir}" ]]; then
file="$(fd "${fd_opts[@]}" . -- "${dir}" | fzf --read0 --select-1 --exit-0 --no-mouse)" file="$(fd "${fd_opts[@]}" . -- "${dir}" | fzy)"
else else
file="$(fd "${fd_opts[@]}" | fzf --read0 --select-1 --exit-0 --no-mouse)" file="$(fd "${fd_opts[@]}" | fzy)"
fi fi
[[ ! "${file}" ]] && exit 1 [[ ! "${file}" ]] && exit 1