From f2621414ee5f2f601424c22f00e207903e3b6104 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:03:18 +0200 Subject: Merging upstream version 1:2.12.0. Signed-off-by: Daniel Baumann --- completions/chkconfig | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'completions/chkconfig') 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 -- cgit v1.2.3