summaryrefslogtreecommitdiff
path: root/completions/gpgv
diff options
context:
space:
mode:
Diffstat (limited to 'completions/gpgv')
-rw-r--r--completions/gpgv12
1 files changed, 6 insertions, 6 deletions
diff --git a/completions/gpgv b/completions/gpgv
index a3221afc..29315c9c 100644
--- a/completions/gpgv
+++ b/completions/gpgv
@@ -6,7 +6,7 @@ _gpgv()
_init_completion || return
case $prev in
- --help|--version|--weak-digest|--*-fd|-!(-*)[?h]*)
+ --help | --version | --weak-digest | --*-fd | -!(-*)[?h]*)
return
;;
--keyring)
@@ -23,15 +23,15 @@ _gpgv()
_count_args "" "--@(weak-digest|*-fd|keyring|homedir)"
if [[ $cur == -* && $args -eq 1 ]]; then
- COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
return
fi
- if [[ $args -gt 1 ]]; then
+ if ((args > 1)); then
if [[ ${COMP_LINE,,} == *.@(asc|sig|sign)\ * ]]; then
# Detached signature, only complete one arbitrary file arg and -
- if [[ $args -eq 2 ]]; then
- COMPREPLY=( $(compgen -W '-' -- "$cur") )
+ if ((args == 2)); then
+ COMPREPLY=($(compgen -W '-' -- "$cur"))
_filedir
fi
else
@@ -41,6 +41,6 @@ _gpgv()
_filedir "@(asc|gpg|sig|sign)"
fi
} &&
-complete -F _gpgv gpgv gpgv2
+ complete -F _gpgv gpgv gpgv2
# ex: filetype=sh