From d38bed58b26a23de86f47b4d63a6f30572a0bd38 Mon Sep 17 00:00:00 2001 From: Placido Fernandez <9625282+fdplacido@users.noreply.github.com> Date: Thu, 15 Oct 2020 17:36:36 +0000 Subject: fix bookmarks plugin on empty output (#762) * fix bookmarks plugin on empty output * fix indentation * remove redundant new line --- plugins/bookmarks | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/bookmarks b/plugins/bookmarks index b25e8e5..9bf491e 100755 --- 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 -- cgit v1.2.3-70-g09d2