[pass] "pass find" as part of "pass show"

Renato Alves alves.rjc at gmail.com
Tue Mar 29 00:36:59 CEST 2016


Working proof-of-concept patch attached.
The result is not exactly like specified and some limitations apply.

For instance:

  pass -f googleano

results in no hit. And:

  pass -f google*ano

works but will not print the matched entry due to "cmd_find" not
accepting this syntax.

Cheers,
Renato


On 25/03/16 05:26, Gabriel Filion wrote:
> Renato Alves:
>> Hi everyone,
>>
>> Would it be possible to include an option in "pass show" to behave like
>> "pass find" and if only one entry is matched, use it?
> 
> I'd personally like it very much to have this kind of functionality
> 
>> The interface I have in mind is something like:
>>
>> % pass -f mozilla
>> (stderr) Found unique match web/mozilla.org/username
>> (stdout) <decrypted password>
>> (exitcode) 0
>>
>> % pass -f google
>> (stderr) Multiple matches found:
>> (stdout) Search Terms: google
>> (stdout) └── web
>> (stdout)     └── google.com
>> (stdout)         ├── user
>> (stdout)         └── anotheruser
>> (exitcode) 1
>>
>> % pass -f googleano
>> (stderr) Found unique match web/google.com/anotheruser
>> (stdout) <decrypted password>
>> (exitcode) 0
>>
>>
>> where "pass -f" == "pass show -f" and -f stands for "--find" or "--fuzzy".
> 
> 
> 
> 
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/password-store
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-fuzzy-option-to-pass.patch
Type: text/x-patch
Size: 1341 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160329/e07763ca/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160329/e07763ca/attachment.asc>


More information about the Password-Store mailing list