PATCH: Fish completion fails when no passwords in the store

Oliver Gondža ogondza at gmail.com
Wed Mar 20 13:01:22 CET 2019


Syntax completion in fish shell fails[0] for pass v1.7.3 when the store 
is empty. I have isolated the issue to 
fab65bda88ea979dbbc49f3d856a1d14ee4f1296[1] and verified the completion 
file from previous commit works.

It is the fish's strict glob handling getting in the way. Attempted 
patch attached. I am leaving an explanation comment in there so this 
does not get reverted again accidentally.

[0]
```
   $ pass in<TAB>/usr/share/fish/vendor_    completions.d/pass.fish 
(line 42): No matches for wildcard “"$prefix"/**"$ext"”. 
                                See `help expand`.
      printf '%s\n' "$prefix"/**"$ext" | sed "s#$prefix/\(.*\)$strip#\1#"
                    ^
in function “__fish_pass_print”
	called on line 99 of file /usr/share/fish/vendor_completions.d/pass.fish
	with parameter list “.gpg .gpg”

in function “__fish_pass_print_entries”
	called on standard input

in command substitution
	called on standard input
```

[1] 
https://git.zx2c4.com/password-store/commit/src/completion/pass.fish-completion?id=fab65bda88ea979dbbc49f3d856a1d14ee4f1296

Cheers!
-- 
oliver

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fish-completion-Handle-empty-directory-gracefully.patch
Type: text/x-patch
Size: 966 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20190320/1aba31e8/attachment.bin>


More information about the Password-Store mailing list