[pass] [feature] dir command, for changing $PASSWORD_STORE_DIR

Kevin Lyda kevin at ie.suberic.net
Fri Oct 17 17:37:15 CEST 2014


I'll just point this out as this is what I use for work passwords. It
works with zsh and makes it so that the wpass command has the same
completion abilities as the pass command.

# alias for work passwords.
wpass() {
  PASSWORD_STORE_DIR=$HOME/.password-store-work pass "$@"
}
compdef -e 'PASSWORD_STORE_DIR=$HOME/.password-store-work _pass' wpass


On Fri, Oct 17, 2014 at 4:31 PM, George Angelopoulos <george at usermod.net> wrote:
> I've just started using pass with more than one password stores. Running
> "export PASSWORD_STORE_DIR='./password-store-2'" all the time is of
> course inconvenient.
> I've made a "passdir" shell function that does this with less typing:
>
> # change the password store directory
> function passdir {
>     if [[ -n "$1" ]]; then
>         wdsave=`pwd`
>         cd `dirname "$0"`
>         export PASSWORD_STORE_DIR="`pwd`/$1"
>         cd $wdsave
>     else
>         unset PASSWORD_STORE_DIR
>     fi
> }
>
>
> This could also be implemented in pass itself, as a command, like "pass
> dir $dirname". Is there any interest for this? Is it feature creep? I'm
> ok sticking with my shell function but I thought I'd mention it.
>
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/password-store



-- 
Kevin Lyda
Galway, Ireland


More information about the Password-Store mailing list