summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-04-23 18:58:11 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2014-04-23 18:58:11 +0200
commite14a170d577783ba7365555cb464488c72f279ce (patch)
tree4535a47a6d65f5284abbcdec64911723e7d490fd
parent69eb9f153155fbb0af1305e1de2f5ee57dbcce49 (diff)
downloadpass-e14a170d577783ba7365555cb464488c72f279ce.tar.gz
pass-e14a170d577783ba7365555cb464488c72f279ce.tar.bz2
pass-e14a170d577783ba7365555cb464488c72f279ce.zip
grep: we need to not throw away the return value
Diffstat (limited to '')
-rwxr-xr-xsrc/password-store.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 3ac0fb4..daadac2 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -366,9 +366,9 @@ cmd_grep() {
exit 1
fi
agent_check
- local search="$1" passfile
+ local search="$1" passfile grepresults
while read -r -d "" passfile; do
- local grepresults="$(gpg -d $GPG_OPTS "$passfile" | grep --color=always "$search")"
+ grepresults="$(gpg -d $GPG_OPTS "$passfile" | grep --color=always "$search")"
[ $? -ne 0 ] && continue
passfile="${passfile%.gpg}"
passfile="${passfile#$PREFIX/}"