m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-02-25 19:05:13 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-02-25 19:05:13 +0100
commitc556e6b2fda7879c7dad2d209f78f0c715468850 (patch)
tree430411c2c3103a3c2d962adf9686483fabe99f56
parentb24a90c8dde57e019b7c88039821c4a39361f1b3 (diff)
Style
-rwxr-xr-xsrc/password-store.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index eced113..07b3552 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -388,7 +388,7 @@ cmd_show() {
}
cmd_find() {
- [[ -z "$@" ]] && die "Usage: $PROGRAM $COMMAND pass-names..."
+ [[ $# -eq 0 ]] && die "Usage: $PROGRAM $COMMAND pass-names..."
IFS="," eval 'echo "Search Terms: $*"'
local terms="*$(printf '%s*|*' "$@")"
tree -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
@@ -399,7 +399,7 @@ cmd_grep() {
local search="$1" passfile grepresults
while read -r -d "" passfile; do
grepresults="$($GPG -d "${GPG_OPTS[@]}" "$passfile" | grep --color=always "$search")"
- [ $? -ne 0 ] && continue
+ [[ $? -ne 0 ]] && continue
passfile="${passfile%.gpg}"
passfile="${passfile#$PREFIX/}"
local passfile_dir="${passfile%/*}/"