[pass] Add 'Change Dir' Functionality

2016-09-18 Thread Jakob Holderbaum
Hi pass Team,

first and foremost, thanks for this great tool!
We are currently using it at several client projects for storing shared team 
secrets like production credentials.

This also means, that a rather often use-case is to call pass on different 
password directories. Setting PASSWORD_STORE_DIR individually for every call 
sometimes feels a bit awkward and let here and there even to mistakes.

So I wan't to implement and submit a patch that basically implements the same 
'Change Dir' functionality as it has been done for 'make' and 'git'.

Both tools allow to specify the optional working dir with -C in front of the 
actual command. For example:

`git -C ~/dev/dotfiles status`

or

`make -C ./build test`

Wouldn't it be great if pass could provide the same interface:

`pass -C ./secrets show production/database_password`

instead of

`PASSWORD_STORE_DIR=./secrets pass show production/database_password`

If you think this would be a valuable extension, I would happily provide a 
patch for that.

By the way, do you have any guidelines for submitting patches? I skimmed the 
pass website but could not find any.

Thanks in advance!

Cheers
Jakob
-- 
Jakob Holderbaum

  http://jakob.io/ | ja...@holderbaum.io


signature.asc
Description: PGP signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/password-store


Re: [pass] Add 'Change Dir' Functionality

2016-09-18 Thread Lucas Hoffmann
Quoting Jakob Holderbaum (2016-09-18 13:52:19)
> We are currently using it at several client projects for storing
> shared team secrets like production credentials.
>
> This also means, that a rather often use-case is to call pass on
> different password directories. Setting PASSWORD_STORE_DIR
> individually for every call sometimes feels a bit awkward and let here
> and there even to mistakes.
>
> So I wan't to implement and submit a patch that basically implements
> the same 'Change Dir' functionality as it has been done for 'make' and
> 'git'.

There where similar questions on the list before (can't give you the
link right now, you have to search the archives yourself) but one
proposed solution was to define aliases in your shell:

alias pass-team1='PASSWORD_STORE_DIR=/somewhere/team1 pass'
alias pass-team2='PASSWORD_STORE_DIR=/somewhere/team2 pass'

Or you can use subfolders in PASSWORD_STORE_DIR with different gpg ids
and use something like git subtree or submodule to manage that (just in
case you did not know, see man page).

Lucas


signature.asc
Description: signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/password-store


Re: [pass] Add 'Change Dir' Functionality

2016-09-18 Thread Brian Candler

On 18/09/2016 12:52, Jakob Holderbaum wrote:

Both tools allow to specify the optional working dir with -C in front of the 
actual command. For example:

`git -C ~/dev/dotfiles status`

or

`make -C ./build test`

Wouldn't it be great if pass could provide the same interface:

`pass -C ./secrets show production/database_password`


Another option I would like to see is to be able to use multiple git 
repos within the tree. This could then be combined with symlinks: e.g.


.password_store/secrets -> /home/me/secrets
.password_store/customer1 -> /home/me/customers/one/password_store

Then you could do:

pass show secrets/production/database_password

as if it were were a single pass tree (but actually commits would take 
place within secrets/.git)


Regards,

Brian.

___
Password-Store mailing list
Password-Store@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/password-store