summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-13 20:37:39 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-13 20:37:39 +0200
commitab67292b4ce728aea904799197e761002832f8c5 (patch)
treee056865c66ec6e4a0ed1b0060ee452347c5d35d6 /bin
parent949d2f7025cbfe4db316a3fc13199ac5c82d4b5b (diff)
[mpass] cleanup of error handling
use || instead of test $? -gt 0, because they do the same thing.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/menuscripts/mpass6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass
index 0117b97..4ecd4bc 100755
--- a/bin/menuscripts/mpass
+++ b/bin/menuscripts/mpass
@@ -18,10 +18,8 @@ do
done
test -z "$file" && exit 1
-pass show -c "$file"
-test $? -gt 0 && exit 1
+pass show -c "$file" || exit 1
+notify-send -t 1000 "mpass" "copied <b>$choice</b>"
[ "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null && # on wayland and cliphist is running
cliphist list | head -n 1 | cliphist delete
-
-notify-send -t 1000 "mpass" "copied <b>$choice</b>"