summaryrefslogtreecommitdiff
path: root/src/password-store.sh
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-04-23 03:51:46 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2014-04-23 03:51:46 +0200
commitec97be9a3e93894ca2b6fd17f0846e538e7d35b9 (patch)
treec8018467f7ca2fc9d2daa997e8bee1ab98aac30f /src/password-store.sh
parent5ec76322db79d80b3b6d4c842884cc8b37c8b0cb (diff)
downloadpass-ec97be9a3e93894ca2b6fd17f0846e538e7d35b9.tar.gz
pass-ec97be9a3e93894ca2b6fd17f0846e538e7d35b9.tar.bz2
pass-ec97be9a3e93894ca2b6fd17f0846e538e7d35b9.zip
While loops don't make variables local.
Diffstat (limited to '')
-rwxr-xr-xsrc/password-store.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index ab63a81..789cf2b 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -68,6 +68,7 @@ set_gpg_recipients() {
exit 1
fi
+ local gpg_id
while read -r gpg_id; do
GPG_RECIPIENT_ARGS+=( "-r" "$gpg_id" )
GPG_RECIPIENTS+=( "$gpg_id" )
@@ -84,7 +85,7 @@ agent_check() {
)"
}
reencrypt_path() {
- local prev_gpg_recipients="" gpg_keys="" current_keys="" index
+ local prev_gpg_recipients="" gpg_keys="" current_keys="" index passfile
local groups="$($GPG --list-config --with-colons | grep ^cfg:group:.*)"
while read -r -d "" passfile; do
local passfile_dir="${passfile%/*}"
@@ -367,7 +368,7 @@ cmd_grep() {
exit 1
fi
agent_check
- local search="$1"
+ local search="$1" passfile
while read -r -d "" passfile; do
local grepresults="$($GPG -d $GPG_OPTS "$passfile" | grep --color=always "$search")"
[ $? -ne 0 ] && continue