瀏覽代碼

fix bookmarks plugin on empty output (#762)

* fix bookmarks plugin on empty output

* fix indentation

* remove redundant new line
master
Placido Fernandez GitHub 4 年之前
父節點
當前提交
d38bed58b2
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. +5
    -1
      plugins/bookmarks

+ 5
- 1
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


Loading…
取消
儲存