Remove script dependency on fzf.sh library file
This commit is contained in:
parent
a8972362fc
commit
7eda5e8c93
@ -100,7 +100,7 @@ if ! [[ -d "$DIR" ]]; then
|
||||
fi
|
||||
|
||||
files="$(find_files "$DIR")"
|
||||
selected_file="$(run_fzf "$files")"
|
||||
selected_file="$(fzf --select-1 --exit-0 <<< "$files")"
|
||||
|
||||
# Check if target exists
|
||||
if [[ -f "$1" && -z "$FORCE_OVERWRITE" ]]; then
|
||||
|
@ -121,7 +121,7 @@ elif [[ -n $NO_IGNORE_VCS ]]; then
|
||||
fi
|
||||
|
||||
files="$(find_files $DIR "${extra_opts[@]}")"
|
||||
selected_file="$(run_fzf "$files")"
|
||||
selected_file="$(fzf --select-1 --exit-0 <<< "$files")"
|
||||
|
||||
if [[ -w "${selected_file}" ]]; then
|
||||
"$EDITOR" "$selected_file"
|
||||
|
@ -1,7 +0,0 @@
|
||||
## FZF helpers
|
||||
|
||||
FZF_OPTS=('--select-1' '--exit-0')
|
||||
|
||||
run_fzf() {
|
||||
fzf "${FZF_OPTS[@]}" -- <<<"$@" || return 2
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user