aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/gpg.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/shrc.d/gpg.sh')
-rw-r--r--sh/shrc.d/gpg.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/sh/shrc.d/gpg.sh b/sh/shrc.d/gpg.sh
new file mode 100644
index 00000000..62d123ea
--- /dev/null
+++ b/sh/shrc.d/gpg.sh
@@ -0,0 +1,10 @@
+# Wrapper around gpg(1) to stop ``--batch'' breaking things
+gpg() {
+ # shellcheck disable=SC2048
+ case $* in
+ *--ed*|*--gen-k*|*--sign-k*)
+ set -- --no-batch "$@"
+ ;;
+ esac
+ command gpg "$@"
+}