nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit aa7f1dabdd7954989b5303c258733673dca26228
parent f54d51c863606456bb4b715e5a2bc98c007be0be
Author: Krisan Alifari <krisan.alifari@gmail.com>
Date:   Sun, 12 Apr 2020 20:36:59 +0700

Support $FZF_DEFAULT_COMMAND on fzopen plugin (#514)


Diffstat:
Mplugins/fzopen | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugins/fzopen b/plugins/fzopen @@ -10,7 +10,9 @@ # Author: Arun Prakash Jana if which fzf >/dev/null 2>&1; then - entry=$(find . -type f 2>/dev/null | fzf --delimiter / --nth=-1 --tiebreak=begin --info=hidden) + cmd="$FZF_DEFAULT_COMMAND" + [ -z "$cmd" ] && cmd="find . -type f 2>/dev/null" + entry="$(eval "$cmd" | fzf --delimiter / --nth=-1 --tiebreak=begin --info=hidden)" # To show only the file name # entry=$(find . -type f 2>/dev/null | fzf --delimiter / --with-nth=-1 --tiebreak=begin --info=hidden) elif which fzy >/dev/null 2>&1; then