aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/gnupg.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bashrc.d/gnupg.bash')
-rw-r--r--bash/bashrc.d/gnupg.bash12
1 files changed, 12 insertions, 0 deletions
diff --git a/bash/bashrc.d/gnupg.bash b/bash/bashrc.d/gnupg.bash
index 98e3ca27..79e43776 100644
--- a/bash/bashrc.d/gnupg.bash
+++ b/bash/bashrc.d/gnupg.bash
@@ -3,6 +3,18 @@ if ! hash gpg 2>/dev/null; then
return
fi
+# Wrapper around gpg(1) to stop ``--batch'' breaking things
+gpg() {
+ case $* in
+ *--ed*|*--sign-k*)
+ command gpg --no-batch "$@"
+ ;;
+ *)
+ command gpg "$@"
+ ;;
+ esac
+}
+
# Completion for gpg with long options
_gpg() {
local word=${COMP_WORDS[COMP_CWORD]}