Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bookmarks plugin on empty output #762

Merged
merged 3 commits into from Oct 15, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion plugins/bookmarks
Expand Up @@ -44,7 +44,12 @@ 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 }
}'

jarun marked this conversation as resolved.
Show resolved Hide resolved
}

# Choose symlink with fzf
Expand Down