summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-12-18 16:01:22 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-12-18 16:01:22 +0100
commitbd1cadd5620279b5ee781434b4f0731eb9ad730d (patch)
tree4078ffb02144f818fa054148c95c813629282d0a
parent7252e8b3cf829e908179913daad16ff2b8bdefdd (diff)
downloadpass-bd1cadd5620279b5ee781434b4f0731eb9ad730d.tar.gz
pass-bd1cadd5620279b5ee781434b4f0731eb9ad730d.tar.bz2
pass-bd1cadd5620279b5ee781434b4f0731eb9ad730d.zip
Quote array specifier
Otherwise this expands to a filename if one exists. Suggested-by: izaberina@gmail.com
Diffstat (limited to '')
-rwxr-xr-xsrc/password-store.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index b86631d..e3cd145 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -121,7 +121,7 @@ reencrypt_path() {
local group="$(sed -n "s/^cfg:group:$(sed 's/[\/&]/\\&/g' <<<"${GPG_RECIPIENTS[$index]}"):\\(.*\\)\$/\\1/p" <<<"$groups" | head -n 1)"
[[ -z $group ]] && continue
IFS=";" eval 'GPG_RECIPIENTS+=( $group )' # http://unix.stackexchange.com/a/92190
- unset GPG_RECIPIENTS[$index]
+ unset "GPG_RECIPIENTS[$index]"
done
gpg_keys="$($GPG $PASSWORD_STORE_GPG_OPTS --list-keys --with-colons "${GPG_RECIPIENTS[@]}" | sed -n 's/sub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u)"
fi