commit 7212160719ea2a80d94b83562a10ecbf28f29095
parent e5661eb80b5cff0dc2ec29fc199557339289aa72
Author: William Casarin <jb55@jb55.com>
Date: Sun, 4 Apr 2021 10:27:22 -0700
notmuch-am: add pipefail
So that it quits if we fail to select a thread with fzf
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/notmuch-am b/notmuch-am
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+set -eo pipefail
+
# ###
#
# Generated by argbash.io
@@ -79,6 +81,9 @@ parse_commandline()
-s|--signoff)
_arg_amsignoff="on"
;;
+ -l|--add-link)
+ _arg_b4addlink="on"
+ ;;
--fuzzy)
_arg_fuzzy="on"
;;
@@ -146,8 +151,11 @@ main () {
if [[ "$_arg_amsignoff" == "on" ]]; then
AM_ARGS+=" --signoff"
fi
+ if [[ "$_arg_b4addlink" == "on" ]]; then
+ B4AM_ARGS+=" --add-link"
+ fi
- b4 am "$msgid" -m "$mbox" -o - | git am $AM_ARGS
+ b4 am "$B4AM_ARGS" "$msgid" -m "$mbox" -o - | git am $AM_ARGS
else
b4 am "$B4AM_ARGS" "$msgid" -m "$mbox"
fi