From bd1cadd5620279b5ee781434b4f0731eb9ad730d Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 18 Dec 2017 16:01:22 +0100 Subject: Quote array specifier Otherwise this expands to a filename if one exists. Suggested-by: izaberina@gmail.com --- src/password-store.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3