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

Hugo Osvaldo Barrera hugo at barrera.io
Tue Sep 23 11:43:46 CEST 2014

Searching currently prints a tree(1) with the results, eg:

    $ pass search wine
    Search Terms: wine
    └── www
        ├── issue-trackers
        │   └── winehq-bugs
        ├── winehq-appdb
        └── winehq-bugzilla

I feel that using find(1) insted would yield results which are more consistent
with the arguments that pass(1) can receive:

    $ cd $HOME/.password-store
    $ find * -iname "*wine*" | sed 's/\.gpg$//'

The strings returned by using find(1) are exactly the format that pass(1)
expects, so we can be even more unixy:

    pass show $(pass search openerp | tail -n 1)
    # I alredy know this returns just one result

Personally, I'd also get rid the line that says "Search Terms: $TERMS"; I feel
that it's redundant and also pollutes the output a bit. Also, users could do
could just do:

    pass show $(pass search openerp)

Any opinions on this?


Hugo Osvaldo Barrera
A: Because we read from top to bottom, left to right.
Q: Why should I start my reply below the quoted text?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140923/550ad584/attachment.asc>

More information about the Password-Store mailing list