diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f4acb49ea148cdd899f7f29f1591c7bc853c2135 (patch) | |
tree | b62d60873864065d6428a84a119dd8a3c90f1397 /completions/dnssec-keygen | |
parent | Adding upstream version 1:2.11. (diff) | |
download | bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.tar.xz bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.zip |
Adding upstream version 1:2.12.0.upstream/1%2.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/dnssec-keygen')
-rw-r--r-- | completions/dnssec-keygen | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/completions/dnssec-keygen b/completions/dnssec-keygen index 3f68a68..9db55b5 100644 --- a/completions/dnssec-keygen +++ b/completions/dnssec-keygen @@ -1,48 +1,48 @@ # bash completion for dnssec-keygen(8) -*- shell-script -*- -_dnssec_keygen_optarg() +_comp_cmd_dnssec_keygen__optarg() { local args=$("$1" -h 2>&1 | command sed -e 's/|/ /g' -e 's/(.*//' \ - -ne '/^[[:space:]]*'$2'/,/^[[:space:]]*[(-]/p' | - command sed -e 's/^[[:space:]]*'$2'.*://' -e '/^[[:space:]]*-/d') - COMPREPLY+=($(compgen -W '$args' -- "$cur")) + -ne '/^[[:space:]]*'"$2"'/,/^[[:space:]]*[(-]/p' | + command sed -e 's/^[[:space:]]*'"$2"'.*://' -e '/^[[:space:]]*-/d') + _comp_compgen -a -- -W '$args' } -_dnssec_keygen() +_comp_cmd_dnssec_keygen() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -[hbEgLpsPARIDSi]) return ;; -K) - _filedir -d + _comp_compgen_filedir -d return ;; -[ancdfTtm]) - _dnssec_keygen_optarg "$1" $prev + _comp_cmd_dnssec_keygen__optarg "$1" "$prev" return ;; -r) - cur=${cur:=/dev/} - _filedir + _comp_compgen -c "${cur:-/dev/}" filedir return ;; -v) - COMPREPLY=($(compgen -W '{0..10}' -- "$cur")) + _comp_compgen -- -W '{0..10}' return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" | \ - command sed -e "s/:\$//")' -- "$cur")) + _comp_compgen -R help + ((${#COMPREPLY[@]})) && + _comp_compgen -- -W '"${COMPREPLY[@]%:}"' return fi } && - complete -F _dnssec_keygen dnssec-keygen + complete -F _comp_cmd_dnssec_keygen dnssec-keygen # ex: filetype=sh |