diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:14 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:14 -0300 |
commit | cc81eb120ad1a456f030f7b828697013a9b2b66a (patch) | |
tree | bb61702f98b407b2f7987faa846190fb3f002e55 /completions/chkconfig | |
parent | 8394526300cc384e53c470303aeb8b4fdcaf84a3 (diff) | |
parent | 95623d39d6029ba78ec96ad5ea08e9ac12629b91 (diff) | |
download | bash-completion-cc81eb120ad1a456f030f7b828697013a9b2b66a.tar.gz |
Update upstream source from tag 'upstream/2.11'
Update to upstream version '2.11'
with Debian dir 932c2c1a6192441f3cd8897e72d737f2f0277f60
Diffstat (limited to 'completions/chkconfig')
-rw-r--r-- | completions/chkconfig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/completions/chkconfig b/completions/chkconfig index f1ee8704..8ff66376 100644 --- a/completions/chkconfig +++ b/completions/chkconfig @@ -6,32 +6,32 @@ _chkconfig() _init_completion -s || return case $prev in - --level=[1-6]|[1-6]|--list|--add|--del|--override) + --level=[1-6] | [1-6] | --list | --add | --del | --override) _services _xinetd_services return ;; --level) - COMPREPLY=( $(compgen -W '{1..6}' -- "$cur") ) + COMPREPLY=($(compgen -W '{1..6}' -- "$cur")) return ;; esac $split && return - if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '--list --add --del --override --level' \ - -- "$cur") ) + if [[ $cur == -* ]]; then + COMPREPLY=($(compgen -W '--list --add --del --override --level' \ + -- "$cur")) else - if [[ $cword -eq 2 || $cword -eq 4 ]]; then - COMPREPLY=( $(compgen -W 'on off reset resetpriorities' \ - -- "$cur") ) + if ((cword == 2 || cword == 4)); then + COMPREPLY=($(compgen -W 'on off reset resetpriorities' \ + -- "$cur")) else _services _xinetd_services fi fi } && -complete -F _chkconfig chkconfig + complete -F _chkconfig chkconfig # ex: filetype=sh |