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

George Angelopoulos george at usermod.net
Fri Oct 17 17:31:37 CEST 2014


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.



More information about the Password-Store mailing list