diff options
author | 2020-02-20 08:37:49 +0530 | |
---|---|---|
committer | 2020-02-20 08:37:49 +0530 | |
commit | a1b8631d96dc95be1a899de2acae9e1f4a511543 (patch) | |
tree | dffbf25c37d8ff0878389ffc04f0af6ee3b15547 | |
parent | 9f1b51b0041cdac17df880366085908e2fd66b30 (diff) | |
download | nnn-a1b8631d96dc95be1a899de2acae9e1f4a511543.tar.gz |
Tweak fzopen to show parent dir and filename with fzf
-rwxr-xr-x | plugins/fzopen | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/fzopen b/plugins/fzopen index 91a504d..7205b7a 100755 --- a/plugins/fzopen +++ b/plugins/fzopen @@ -10,15 +10,15 @@ # Author: Arun Prakash Jana if which fzf >/dev/null 2>&1; then - fuzzy=fzf + entry=$(find . -type f 2>/dev/null | 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 - fuzzy=fzy + entry=$(find . -type f 2>/dev/null | fzy) else exit 1 fi -entry="$(find . -type f 2>/dev/null | "$fuzzy")" - case "$(file -biL "$entry")" in *text*) "${VISUAL:-$EDITOR}" "$entry" ;; |