[pass] Hiccup in zsh completions.
Kevin Cox
kevincox at kevincox.ca
Tue Apr 22 17:57:07 CEST 2014
Hello,
I found a small bug in the zsh completions. Basically when the
PASSWORD_STORE_DIR ends in a slash the first character of the
result is eaten, making completion essentially useless. (It does
this before determining matches).
This can be fixed by changing what is line 106 in my version from:
_values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}.##" -e 's#\.gpg##' | sort)
to
_values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}/\\?##" -e 's#\.gpg##' | sort)
The difference is the first sed regex expression. The original
version assumed that the next character was a slash and removed
it while the new version only removes it if it is a slash.
"s#${prefix}.##" -> "s#${prefix}/\\?##"
Cheers,
Kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140422/21ce3ea3/attachment.asc>
More information about the Password-Store
mailing list