[pass] Patch and discussion for scriptable interface to pass

Lucas Hoffmann l-m-h at web.de
Tue Feb 9 10:12:49 CET 2016


Quoting Lucas Hoffmann (2016-02-05 21:42:29)
> This even results in a small "bug":  pass assumes that password files
> have a gpg extension.  Other files are not used by `pass show`.  That
> is the internal assumtion/restriction/interface.  The bug is that
> files without a gpg extension are listed in the tree (plain `pass
> show`) but can (obviously) not be shown directly (`pass show makefile`
> says "Error: makefile is not in the password store." even though
> "makefile" is returned by the completion and listed in the tree).

Attached is a patch that fixes some parts of the bug.  Patch 1 and 3
take care that only *.gpg files are considered when showing, finding or
completing password entries.

Patch 2 extends a assumption that is implicit in the sed command that
removes the gpg extension after tree.  Namely that this gpg extension is
lower case.  The patch makes grep and reencrypt only care about files
with lower case gpg extensions.

Patch 4 makes the zsh completion ignore all hidden (.*) files when
completing password entries.  This might be useful for people having a
.gitattributes file to view human readable diffs.  Or people who have a
.bin folder in the password store to keep some scripts hidden from `pass
show` and friends.

Each of these patches can be merged individually, they are not
interdependent (although 1 and 3 are fixing the same bug).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-show-find-Only-list-.gpg-files.patch
Type: text/x-diff
Size: 1847 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160209/2266a43f/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-grep-reencrypt-Do-not-ignore-case-only-find-.gpg.patch
Type: text/x-diff
Size: 1766 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160209/2266a43f/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-zsh-completion-Only-complete-.gpg-files-for-password.patch
Type: text/x-diff
Size: 1501 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160209/2266a43f/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-zsh-completion-Ignore-all-hidden-files.patch
Type: text/x-diff
Size: 1937 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160209/2266a43f/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160209/2266a43f/attachment.asc>


More information about the Password-Store mailing list