aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/gpg.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-02-12 00:07:27 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-02-12 00:07:27 +1300
commit2d69a56b9d1314658de29ace609a11d312a66130 (patch)
tree90487e5ea7baf315ea0a7db673cf701b86a36839 /bash/bash_completion.d/gpg.bash
parent18a5463ea2d39cb5502eb3cfba7281f03472bfd1 (diff)
downloaddotfiles-2d69a56b9d1314658de29ace609a11d312a66130.tar.gz
dotfiles-2d69a56b9d1314658de29ace609a11d312a66130.zip
Use bashdefault if available in more completions
Diffstat (limited to 'bash/bash_completion.d/gpg.bash')
-rw-r--r--bash/bash_completion.d/gpg.bash8
1 files changed, 7 insertions, 1 deletions
diff --git a/bash/bash_completion.d/gpg.bash b/bash/bash_completion.d/gpg.bash
index fcb48b91..6d4cf345 100644
--- a/bash/bash_completion.d/gpg.bash
+++ b/bash/bash_completion.d/gpg.bash
@@ -14,4 +14,10 @@ _gpg() {
COMPREPLY[${#COMPREPLY[@]}]=$option
done < <(gpg --dump-options 2>/dev/null)
}
-complete -F _gpg -o default gpg
+
+# bashdefault requires Bash >=3.0
+if ((BASH_VERSINFO[0] >= 3)) ; then
+ complete -F _gpg -o bashdefault -o default gpg
+else
+ complete -F _gpg -o default gpg
+fi