mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-25 14:17:40 +00:00
Make fzf-tmux work when fzf is not in $PATH but in the same directory
See: #181
This commit is contained in:
parent
797f42ecc6
commit
348731fc3b
@ -106,7 +106,9 @@ fail() {
|
||||
>&2 echo "$1"
|
||||
exit 1
|
||||
}
|
||||
fzf=$(which fzf 2> /dev/null) || fail "fzf executable not found"
|
||||
fzf="$(which fzf 2> /dev/null)" || fzf="$(dirname "$0")/fzf"
|
||||
[ -x "$fzf" ] || fail "fzf executable not found"
|
||||
|
||||
envs=""
|
||||
[ -n "$FZF_DEFAULT_OPTS" ] && envs="$envs FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS")"
|
||||
[ -n "$FZF_DEFAULT_COMMAND" ] && envs="$envs FZF_DEFAULT_COMMAND=$(printf %q "$FZF_DEFAULT_COMMAND")"
|
||||
|
Loading…
Reference in New Issue
Block a user