nnn

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

commit d38bed58b26a23de86f47b4d63a6f30572a0bd38
parent dbf12ed031cb26394ca1c8a0b0dcf3ad1a2b523b
Author: Placido Fernandez <9625282+fdplacido@users.noreply.github.com>
Date:   Thu, 15 Oct 2020 17:36:36 +0000

fix bookmarks plugin on empty output (#762)

* fix bookmarks plugin on empty output

* fix indentation

* remove redundant new line
Diffstat:
Mplugins/bookmarks | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/plugins/bookmarks b/plugins/bookmarks @@ -44,7 +44,11 @@ get_links() { [ -d "$entry" ] || continue printf "%20s -> %s\n" "$(basename "$entry")" "$(readlink -f "$entry")" - done | fzf | awk 'END { print "'"$BOOKMARKS_DIR"'/"$1 }' + done | fzf | + awk 'END { + if (length($1) == 0) { print "'"$PWD"'" } + else { print "'"$BOOKMARKS_DIR"'/"$1 } + }' } # Choose symlink with fzf