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 | f2621414ee5f2f601424c22f00e207903e3b6104 (patch) | |
tree | 56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/chkconfig | |
parent | Adding debian version 1:2.11-8. (diff) | |
download | bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip |
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/chkconfig')
-rw-r--r-- | completions/chkconfig | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/completions/chkconfig b/completions/chkconfig index 8ff6637..32c3392 100644 --- a/completions/chkconfig +++ b/completions/chkconfig @@ -1,37 +1,35 @@ # chkconfig(8) completion -*- shell-script -*- -_chkconfig() +_comp_cmd_chkconfig() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case $prev in --level=[1-6] | [1-6] | --list | --add | --del | --override) - _services - _xinetd_services + _comp_compgen_services + _comp_compgen -a xinetd_services return ;; --level) - COMPREPLY=($(compgen -W '{1..6}' -- "$cur")) + _comp_compgen -- -W '{1..6}' return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--list --add --del --override --level' \ - -- "$cur")) + _comp_compgen -- -W '--list --add --del --override --level' else if ((cword == 2 || cword == 4)); then - COMPREPLY=($(compgen -W 'on off reset resetpriorities' \ - -- "$cur")) + _comp_compgen -- -W 'on off reset resetpriorities' else - _services - _xinetd_services + _comp_compgen_services + _comp_compgen -a xinetd_services fi fi } && - complete -F _chkconfig chkconfig + complete -F _comp_cmd_chkconfig chkconfig # ex: filetype=sh |