Ver código fonte

fix bookmarks plugin on empty output (#762)

* fix bookmarks plugin on empty output

* fix indentation

* remove redundant new line
master
Placido Fernandez GitHub 4 anos atrás
pai
commit
d38bed58b2
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
1 arquivos alterados com 5 adições e 1 exclusões
  1. +5
    -1
      plugins/bookmarks

+ 5
- 1
plugins/bookmarks Ver arquivo

@@ -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


Carregando…
Cancelar
Salvar