Here is the patch that provides default wildcards support.

diff --git a/password-store/src/password-store.sh
b/password-store-feature/src/password-store.sh
index 47f7ffa..42d2e1f 100755
--- a/password-store/src/password-store.sh
+++ b/password-store-feature/src/password-store.sh
@@ -226,6 +226,8 @@ cmd_usage() {
            $PROGRAM [show] [--clip,-c] pass-name
                Show existing password and optionally put it on the
clipboard.
                If put on the clipboard, it will be cleared in $CLIP_TIME
seconds.
+               Pass-name can contain wildcards (*) or be a substring.  If
it
+               matches uniquely, operate on that password file.
            $PROGRAM grep search-string
                Search for password files containing search-string when
decrypted.
            $PROGRAM insert [--echo,-e | --multiline,-m] [--force,-f]
pass-name
@@ -308,6 +310,13 @@ cmd_show() {
        local path="$1"
        local passfile="$PREFIX/$path.gpg"
        check_sneaky_paths "$path"
+
+       passfile=`find "$PREFIX" -path *$1*.gpg`
+       results=`echo $passfile | tr " " "\n" | wc -l`
+       if [[ $results -ne 1 && -n "$1" ]]; then
+               die "$results passwords found (need 1)"
+       fi
+
        if [[ -f $passfile ]]; then
                if [[ $clip -eq 0 ]]; then
                        $GPG -d "${GPG_OPTS[@]}" "$passfile" || exit $?
_______________________________________________
Password-Store mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to