diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-12-11 17:11:34 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-12-11 17:11:34 +1300 |
commit | a62f438f0f6d36066a65f5780dea5605a32016a2 (patch) | |
tree | e59ead8fc858de363d3750bae99df9db00dd2511 /bash | |
parent | Better error conditions (diff) | |
download | dotfiles-a62f438f0f6d36066a65f5780dea5605a32016a2.tar.gz dotfiles-a62f438f0f6d36066a65f5780dea5605a32016a2.zip |
Stop ``--batch'' breaking things for GnuPG
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc.d/gnupg.bash | 12 |
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]} |