[pass] Extending pass with user-defined hooks / add ons

David Logie djl at mksh.org
Fri Jul 31 14:36:03 CEST 2015

On Fri 2015-07-31 13:43, Steffen Vogel wrote:
> Hi list,
> > This is only a suggestion, but I wonder if it makes sense to try to build a toolbox of useful scripts like this which is *not* integrated into the main script (in the Unix tradition of "small is beautiful“).
> Mike proposed something like a plugin / hook system to extend pass’ functionality for things like
>  - the age of the password
>  - last usage of the password
> I really like this idea.
> Maybe we can add a new (hidden) folder to the password git repo.
> This directory then holds the user-specific extensions, like:
>      ~/.password-store/.hooks/age.sh
> Then we only need to extend the main script to source the appropriate add on when calling:
>     pass age mysuperpassword

What about a system similar to Git[1] where subcommands are just
exectuables in your $PATH?

This has some benefits over keeping commands in your password store:

* pass doesn't have to care about special or "blessed" directories
* Subcommands can be written in any language
* It's easy for third party packages to add new commands

Plus if you want to keep your passwords and custom commands together you
can add ~/.password-store/.hooks (or whatever it may be) to your $PATH.

[1]: https://www.kernel.org/pub/software/scm/git/docs/howto/new-command.html

More information about the Password-Store mailing list