#compdef rulesctl

autoload -U is-at-least

_rulesctl() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" \
'-c+[The precached config file to use]' \
'--config=[The precached config file to use]' \
'-a[Produce ASCII output (default) instead of using Unicode for line drawing]' \
'--ascii[Produce ASCII output (default) instead of using Unicode for line drawing]' \
'-u[Produce Unicode output instead of using ASCII (default) for line drawing]' \
'--unicode[Produce Unicode output instead of using ASCII (default) for line drawing]' \
'*-v[Sets the level of output verbosity]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_rulesctl_commands" \
"*::: :->rulesctl" \
&& ret=0
    case $state in
    (rulesctl)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rulesctl-command-$line[1]:"
        case $line[1] in
            (status)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':filename -- The name of the .rules file to show:_files' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':filename -- The name of the .rules file to show:_files' \
&& ret=0
;;
(enable)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':filename -- The name of the .rules file to enable:_files' \
&& ret=0
;;
(disable)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':filename -- The name of the .rules file to disable:_files' \
&& ret=0
;;
(reload)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':SHELL -- The shell to generate the script for:(bash fish zsh powershell)' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_rulesctl_commands] )) ||
_rulesctl_commands() {
    local commands; commands=(
        "status:Show the current status of the precached rules subsystem" \
"list:List all available .rules files" \
"show:Print information about a specific .rules file" \
"enable:Enable a specific .rules file" \
"disable:Disable a specific .rules file" \
"reload:Tell precached to reload its configuration and .rules files" \
"help:Display this short help text" \
"completions:Generates completion scripts for your shell" \
    )
    _describe -t commands 'rulesctl commands' commands "$@"
}
(( $+functions[_rulesctl__completions_commands] )) ||
_rulesctl__completions_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'rulesctl completions commands' commands "$@"
}
(( $+functions[_rulesctl__disable_commands] )) ||
_rulesctl__disable_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'rulesctl disable commands' commands "$@"
}
(( $+functions[_rulesctl__enable_commands] )) ||
_rulesctl__enable_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'rulesctl enable commands' commands "$@"
}
(( $+functions[_rulesctl__help_commands] )) ||
_rulesctl__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'rulesctl help commands' commands "$@"
}
(( $+functions[_info_commands] )) ||
_info_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'info commands' commands "$@"
}
(( $+functions[_rulesctl__info_commands] )) ||
_rulesctl__info_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'rulesctl info commands' commands "$@"
}
(( $+functions[_rulesctl__list_commands] )) ||
_rulesctl__list_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'rulesctl list commands' commands "$@"
}
(( $+functions[_rulesctl__reload_commands] )) ||
_rulesctl__reload_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'rulesctl reload commands' commands "$@"
}
(( $+functions[_rulesctl__show_commands] )) ||
_rulesctl__show_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'rulesctl show commands' commands "$@"
}
(( $+functions[_rulesctl__status_commands] )) ||
_rulesctl__status_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'rulesctl status commands' commands "$@"
}

_rulesctl "$@"