Comments in-line below.
> From 14ccc3a1945b9f2754309d64fa3e342232c713a2 Mon Sep 17 00:00:00 2001 > From: George Angelopoulos <[email protected]> > Date: Thu, 12 Feb 2015 19:46:30 +0100 > Subject: [PATCH] show and find only actual password entries (*.gpg) > Password stores might contain things that are not password entries - > for example, a README.md file, if uploaded to a service like GitLab > and used by multiple people. Such a file has no reason to be shown > by "pass show" or "pass find". > --- > src/password-store.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > diff --git a/src/password-store.sh b/src/password-store.sh > index 47f7ffa..6218c6c 100755 > --- a/src/password-store.sh > +++ b/src/password-store.sh > @@ -322,7 +322,7 @@ cmd_show() { > else > echo "${path%\/}" > fi > - tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed > 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g' # remove .gpg at end of > line, but keep colors > + tree -C -l --noreport "$PREFIX/$path" -P '*.gpg' | tail -n +2 | sed > 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g' # remove .gpg at end of > line, but keep colors > elif [[ -z $path ]]; then > die "Error: password store is empty. Try \"pass init\"." > else > @@ -334,7 +334,7 @@ cmd_find() { > [[ -z "$@" ]] && die "Usage: $PROGRAM $COMMAND pass-names..." > IFS="," eval 'echo "Search Terms: $*"' > local terms="*$(printf '%s*|*' "$@")" > - tree -C -l --noreport -P "${terms%|*}" --prune --matchdirs > --ignore-case "$PREFIX" | tail -n +2 | sed > 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g' > + tree -C -l --noreport -P "${terms%|*}.gpg" --prune --matchdirs > --ignore-case "$PREFIX" -P '*.gpg' | tail -n +2 | sed > 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g' > This line already has a -P with .gpg. Seems like adding it at the end is redundant. Can you resubmit this with just the first fix? > } > > cmd_grep() { > -- > 2.3.0
_______________________________________________ Password-Store mailing list [email protected] http://lists.zx2c4.com/mailman/listinfo/password-store
