password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 46d26994d0ff6b7fdcc2b043b0186703c0026b06
parent 07b169ec32ad6961ed8625a0b932a663abcb01d2
Author: Johannes Altmanninger <aclopte@gmail.com>
Date:   Thu, 25 Jun 2020 23:41:06 +0200

fish-completion: avoid printing errors with an empty password store

Reproduce by typing "pass <TAB>" in a shell launched like: HOME=`mktemp -d` fish

Fish prints an error on failing globs - except when used in one of the commands
"set", "for" or "count". Also quotes are unnecessary here.

Diffstat:
Msrc/completion/pass.fish-completion | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/completion/pass.fish-completion b/src/completion/pass.fish-completion @@ -39,7 +39,8 @@ function __fish_pass_print set -l ext $argv[1] set -l strip $argv[2] set -l prefix (__fish_pass_get_prefix) - printf '%s\n' "$prefix"/**"$ext" | sed "s#$prefix/\(.*\)$strip#\1#" + set -l matches $prefix/**$ext + printf '%s\n' $matches | sed "s#$prefix/\(.*\)$strip#\1#" end function __fish_pass_print_entry_dirs