[pass] [PATCH] Add a new parameter to the show command

William Robinet willi at mrobi.net
Mon Feb 2 20:14:34 CET 2015

On Mon, Feb 2, 2015 at 5:58 PM, Étienne Deparis <etienne at depar.is> wrote:
> Hi!
> I use intensively pass, which is a clever solution to password
> management. However I miss a feature, which allow me to quickly get
> password information when I know the pass file, but forgot (or don't
> want to remember) its position in the password tree.
> Thus, I propose the attached patch, which add an option to the "show"
> command in order to display the content of the first file matching the
> path parameter. Sort of "I'm lucky" thing for my password bucket.

Hi Etienne, List,

I implemented something very similar on my local pass some time ago.
This is a good opportunity to post it to the list. It's only 5 lines
added to the
show function. Please note that the man/documentation is not updated, and that
the code/patch is probably note formatted as it should be.

The attached patch changes the behavior of the show command.
When the argument is a keyword, i.e. text with no "/" in it, it simply tries
to find a single matching password and shows it. It only works if the search
matches a single result.
The normal "show" behaviour is not changed if a path is given as an argument.
There is no need to use an extra option or parameter to trigger the
new functionality.


Normal show behavior:
$ pass show private/misc/www.example.com
login: blibli

Keyword based show behavior:
$ pass show example
login: blibli

$ pass show example.net
Error: example.net is not in the password store.

This patch is formatted against version 1.6.5.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pass-1.6.5-show_keyword.patch
Type: text/x-patch
Size: 494 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20150202/65a6514f/attachment.bin>

More information about the Password-Store mailing list