Explorar el Código

fix bookmarks plugin on empty output (#762)

* fix bookmarks plugin on empty output

* fix indentation

* remove redundant new line
master
Placido Fernandez GitHub hace 4 años
padre
commit
d38bed58b2
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. +5
    -1
      plugins/bookmarks

+ 5
- 1
plugins/bookmarks Ver fichero

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


Cargando…
Cancelar
Guardar