<div dir="ltr"><div>Comments in-line below.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">From 14ccc3a1945b9f2754309d64fa3e342232c713a2 Mon Sep 17 00:00:00 2001<br>From: George Angelopoulos <<a href="mailto:george@usermod.net">george@usermod.net</a>><br>Date: Thu, 12 Feb 2015 19:46:30 +0100<br>Subject: [PATCH] show and find only actual password entries (*.gpg)<br>Password stores might contain things that are not password entries -<br>for example, a README.md file, if uploaded to a service like GitLab<br>and used by multiple people. Such a file has no reason to be shown<br>by "pass show" or "pass find".<br>---<br> src/password-store.sh | 4 ++--<br> 1 file changed, 2 insertions(+), 2 deletions(-)<br>diff --git a/src/password-store.sh b/src/password-store.sh<br>index 47f7ffa..6218c6c 100755<br>--- a/src/password-store.sh<br>+++ b/src/password-store.sh<br>@@ -322,7 +322,7 @@ cmd_show() {<br> <span class="" style="white-space:pre">              </span>else<br> <span class="" style="white-space:pre">                  </span>echo "${path%\/}"<br> <span class="" style="white-space:pre">           </span>fi<br>-<span class="" style="white-space:pre">             </span>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<br>+<span class="" style="white-space:pre">                </span>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<br> <span class="" style="white-space:pre">    </span>elif [[ -z $path ]]; then<br> <span class="" style="white-space:pre">             </span>die "Error: password store is empty. Try \"pass init\"."<br> <span class="" style="white-space:pre">  </span>else<br>@@ -334,7 +334,7 @@ cmd_find() {<br> <span class="" style="white-space:pre">        </span>[[ -z "$@" ]] && die "Usage: $PROGRAM $COMMAND pass-names..."<br> <span class="" style="white-space:pre">     </span>IFS="," eval 'echo "Search Terms: $*"'<br> <span class="" style="white-space:pre">    </span>local terms="*$(printf '%s*|*' "$@")"<br>-<span class="" style="white-space:pre">      </span>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'<br>+<span class="" style="white-space:pre">       </span>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'<br></blockquote><div><br></div><div>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?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> }<br> <br> cmd_grep() {<br>-- <br>2.3.0</blockquote><div><br></div></div>