[pass] Use find instead of tree to search for cmd_find

Serpent7776 serpent7776 at gmail.com
Thu Oct 2 20:56:43 CEST 2014


On Thu, 25 Sep 2014 21:04:51 -0300
Hugo Osvaldo Barrera <hugo at barrera.io> wrote:

> On 2014-09-25 22:58, Serpent7776 wrote:
> > Hello,
> > 
> > Some time ago I've sent a patch that add switch -1 (number one, not letter
> > ell) to command ls that lists passwords one per line using find. I attach
> > modified version that also add switch -1 to search command. Unfortunately
> > it only accept one term when searching, so
> > 
> > pass search -1 foo
> > 
> > works, but
> > 
> > pass search -1 foo bar
> > 
> > will search only for foo
> > This could be fixed by using 
> > 
> > find -iregex
> > 
> > and I made it to work on FreeBSD with find -E, but GNU find does not
> > understand -E option
> > 
> 
> `find ... | grep -e` would work similar and is really portable POSIX. It's
> slightly less efficient, but: How many passwords can one have?

I somehow didn't think about using grep here.
I attach a diff with code modified to use grep -e.

-- 
//Serpent7776
-------------- next part --------------
A non-text attachment was scrubbed...
Name: password-store.patch
Type: text/x-patch
Size: 3029 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20141002/1dd4a4c7/attachment.bin>


More information about the Password-Store mailing list