So the final patch:
diff --git a/src/password-store.sh b/src/password-store.sh
index 284eabf..0fe0dc5 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -6,10 +6,11 @@
umask "${PASSWORD_STORE_UMASK:-077}"
set -o pipefail
-GPG_OPTS=( $PASSWORD_STORE_GPG_OPTS "--quiet" "--yes"
> - grepresults="$($GPG -d "${GPG_OPTS[@]}" "$passfile" | grep
> --color=always "$@")"
> - [[ $? -ne 0 ]] && continue
> - passfile="${passfile%.gpg}"
> - passfile="${passfile#$PREFIX/}"
> - local passfile_dir="${passfile%/*}/"
> -
Here's a revised patch.
diff --git a/src/password-store.sh b/src/password-store.sh
index 284eabf..d6a341e 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -6,10 +6,11 @@
umask "${PASSWORD_STORE_UMASK:-077}"
set -o pipefail
-GPG_OPTS=( $PASSWORD_STORE_GPG_OPTS "--quiet"
Hmm, I see. I thought best practice was to store command line arguments as an
array?
Anyway, can't really change that haha. I'll read it in using `read -a` as you
(and shellcheck) suggest.
- Chiraag
--
ಚಿರಾಗ್ ನಟರಾಜ್
Graduate Student at Brown University
Email: chiraag.nata...@gmail.com
Phone:
>
> I'm surprised that shellcheck didn't complain about lines 26, 58, 73,
> 96, 98, 141 (of the patch, don't know its correspondences with the code).
Most of those are inside `[[` tests, so they don't require quoting (word
splitting doesn't happen inside `[[`). The other case is a for loop,
Sorry I'm sending yet another email, but be careful with tabs/spaces,
you are mixing them in the patch. Many lines are not actually changed
except for the mix, that is not nice.
I'm surprised that shellcheck didn't complain about lines 26, 58, 73,
96, 98, 141 (of the patch, don't know its
Roger! But don't trust the tests, there're lots missing :P
BTW, the submission format here is using git-email or something like
that, meaning the patch goes inline w/ the email.
Cheers!
On 5/18/19 7:18 PM, ಚಿರಾಗ್ ನಟರಾಜ್ wrote:
> Copy that!
>
> I fixed many (but not all) of the warnings. Two we
Copy that!
I fixed many (but not all) of the warnings. Two we can't _really_ do anything
about (the SC1090s) and two I'm not quite sure how to fix. After my
modifications, it passes all the tests, which is a good sign, but there's
definitely a chance I misinterpreted something in the code.