Hi Robert, > I have small problem with existing functionality. > I created password: > > pass insert foo/bar/psql > > Then I have created another password: > > pass insert foo/bar/psql/user1 > > Right now when I am trying to retrive psql password: > > pass show foo/bar/psql > > I am getting tree of the subfolder instead of the password.
I believe the issue you are seeing was fixed by commit 0d9c02562 in the Git repository. I have attached that particular patch to this message, although I can't remember if this list lets attachments through. Mark. -- Mark Lawrence
From 0d9c02562ea5792fdf9691135a2b48f667a4c97d Mon Sep 17 00:00:00 2001 From: Brian Mattern <[email protected]> Date: Mon, 20 May 2013 09:44:33 -0700 Subject: [PATCH 1/1] check if a passfile exists before checking for directory --- src/password-store.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/password-store.sh b/src/password-store.sh index d7b00b7..e080627 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -207,19 +207,8 @@ case "$command" in fi path="$1" - if [[ -d $PREFIX/$path ]]; then - if [[ -z $path ]]; then - echo "Password Store" - else - echo "${path%\/}" - fi - tree -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg$//' - else - passfile="$PREFIX/$path.gpg" - if [[ ! -f $passfile ]]; then - echo "$path is not in the password store." - exit 1 - fi + passfile="$PREFIX/$path.gpg" + if [[ -f $passfile ]]; then if [[ $clip -eq 0 ]]; then exec gpg2 -d $GPG_OPTS "$passfile" else @@ -227,6 +216,16 @@ case "$command" in [[ -n $pass ]] || exit 1 clip "$pass" "$path" fi + elif [[ -d $PREFIX/$path ]]; then + if [[ -z $path ]]; then + echo "Password Store" + else + echo "${path%\/}" + fi + tree -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg$//' + else + echo "$path is not in the password store." + exit 1 fi ;; insert) -- 1.8.4.2
_______________________________________________ Password-Store mailing list [email protected] http://lists.zx2c4.com/mailman/listinfo/password-store
