summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/password-store.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index c141f0e..3c3ce6a 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -87,7 +87,7 @@ agent_check() {
}
reencrypt_path() {
local prev_gpg_recipients="" gpg_keys="" current_keys="" index passfile
- local groups="$(gpg --list-config --with-colons | grep ^cfg:group:.*)"
+ local groups="$(gpg --list-config --with-colons | grep "^cfg:group:.*")"
while read -r -d "" passfile; do
local passfile_dir="${passfile%/*}"
passfile_dir="${passfile_dir#$PREFIX}"
@@ -97,9 +97,9 @@ reencrypt_path() {
local passfile_temp="${passfile}.tmp.${RANDOM}.${RANDOM}.${RANDOM}.${RANDOM}.--"
set_gpg_recipients "$passfile_dir"
- if [[ $prev_gpg_recipients != "${GPG_RECIPIENTS[@]}" ]]; then
+ if [[ $prev_gpg_recipients != "${GPG_RECIPIENTS[*]}" ]]; then
for index in "${!GPG_RECIPIENTS[@]}"; do
- local group="$(sed -n "s/^cfg:group:${GPG_RECIPIENTS[$index]}:\\(.*\\)$/\\1/p" <<<"$groups" | head -n 1)"
+ local group="$(sed -n "s/^cfg:group:${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]
@@ -113,7 +113,7 @@ reencrypt_path() {
gpg -d $GPG_OPTS "$passfile" | gpg -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile_temp" $GPG_OPTS &&
mv "$passfile_temp" "$passfile" || rm -f "$passfile_temp"
fi
- prev_gpg_recipients="${GPG_RECIPIENTS[@]}"
+ prev_gpg_recipients="${GPG_RECIPIENTS[*]}"
done < <(find "$1" -iname '*.gpg' -print0)
}
check_sneaky_paths() {
@@ -343,7 +343,7 @@ cmd_find() {
echo "Usage: $PROGRAM $COMMAND pass-names..."
exit 1
fi
- local terms="$@"
+ local terms="$*"
echo "Search Terms: $terms"
tree -C -l --noreport -P "*${terms// /*|*}*" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed 's/\.gpg$//'
}
@@ -362,7 +362,7 @@ cmd_grep() {
passfile="${passfile#$PREFIX/}"
local passfile_dir="${passfile%/*}"
passfile="${passfile##*/}"
- printf "\e[94m$passfile_dir/\e[1m$passfile\e[0m:\n"
+ printf "\e[94m%s/\e[1m%s\e[0m:\n" "$passfile_dir" "$passfile"
echo "$grepresults"
done < <(find "$PREFIX" -iname '*.gpg' -print0)
}
/password-store.el?h=1.7.2&id=65cead8c0fdb07ce3821f6b97bdcb32684d0c3f7&follow=1'>emacs: Release version 1.0.1 of Emacs packageSvend Sorensen2-5/+10 2017-08-29emacs: --run-async: Quote shell argumentsDamien Cassou1-4/+5 2017-08-29emacs: Update author's email addressSvend Sorensen1-2/+2 2017-08-29emacs: Fix package-lint violationsSvend Sorensen1-2/+3 2017-07-26emacs: Release version 1.0.0 of Emacs packageSvend Sorensen2-1/+8 2017-07-26emacs: Use with-editor to wrap "pass edit"Svend Sorensen2-9/+17 2017-04-13Bump version1.7.1Jason A. Donenfeld1-1/+1 2017-04-13init: match only the public keyJason A. Donenfeld1-1/+1 2017-03-28Use $GPG variableJason A. Donenfeld1-3/+3 2017-03-20Fix compatibility with GnuPG 2.2.19Andreas Stieger2-2/+2 2017-03-01tests: fix on OSX by not using the tr hackJason A. Donenfeld3-5/+2 2017-02-26Bump version1.7Jason A. Donenfeld1-1/+1 2017-02-26Modernize makefileJason A. Donenfeld2-31/+36 2017-02-25CopyrightJason A. Donenfeld1-1/+1 2017-02-25StyleJason A. Donenfeld1-2/+2 2017-02-25git: use inner-most directoryJason A. Donenfeld2-27/+48 2017-02-25clip: sleep may require argv[0] to be sleepJason A. Donenfeld1-1/+1 2017-02-25man: document system extensionsJason A. Donenfeld1-2/+3