#compdef sn0int

autoload -U is-at-least

_sn0int() {
    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[@]}" \
'-w+[Select a different workspace instead of the default]' \
'--workspace=[Select a different workspace instead of the default]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_sn0int_commands" \
"*::: :->sn0int" \
&& ret=0
    case $state in
    (sn0int)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:sn0int-command-$line[1]:"
        case $line[1] in
            (run)
_arguments "${_arguments_options[@]}" \
'-f+[Run a module from a path]' \
'--file=[Run a module from a path]' \
'-j+[Run modules concurrently]' \
'--threads=[Run modules concurrently]' \
'*-v[Verbose logging, once to print inserts even if they don'\''t add new data, twice to activate the debug() function]' \
'*--verbose[Verbose logging, once to print inserts even if they don'\''t add new data, twice to activate the debug() function]' \
'--stdin[Expose stdin to modules]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'::module -- Execute a module that has been installed:_files' \
&& ret=0
;;
(sandbox)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':label -- This value is only used for process listings:_files' \
&& ret=0
;;
(login)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(publish)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':paths -- The scripts to publish:_files' \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':module -- The script to install:_files' \
'::version -- Specify the version, defaults to the latest version:_files' \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':query -- The search query:_files' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':shell:(zsh bash fish powershell elvish)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_sn0int_commands] )) ||
_sn0int_commands() {
    local commands; commands=(
        "run:Run a module directly" \
"sandbox:For internal use" \
"login:Login to the registry for publishing" \
"publish:Publish a script to the registry" \
"install:Install a module from the registry" \
"search:Search in the registry" \
"completions:Generate shell completions" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'sn0int commands' commands "$@"
}
(( $+functions[_sn0int__completions_commands] )) ||
_sn0int__completions_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'sn0int completions commands' commands "$@"
}
(( $+functions[_sn0int__help_commands] )) ||
_sn0int__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'sn0int help commands' commands "$@"
}
(( $+functions[_sn0int__install_commands] )) ||
_sn0int__install_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'sn0int install commands' commands "$@"
}
(( $+functions[_sn0int__login_commands] )) ||
_sn0int__login_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'sn0int login commands' commands "$@"
}
(( $+functions[_sn0int__publish_commands] )) ||
_sn0int__publish_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'sn0int publish commands' commands "$@"
}
(( $+functions[_sn0int__run_commands] )) ||
_sn0int__run_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'sn0int run commands' commands "$@"
}
(( $+functions[_sn0int__sandbox_commands] )) ||
_sn0int__sandbox_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'sn0int sandbox commands' commands "$@"
}
(( $+functions[_sn0int__search_commands] )) ||
_sn0int__search_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'sn0int search commands' commands "$@"
}

_sn0int "$@"