#compdef clipcat-notify

autoload -U is-at-least

_clipcat-notify() {
    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[@]}" \
'--no-clipboard[Do not listen clipboard]' \
'--no-primary[Do not listen primary]' \
'--no-secondary[Do not listen secondary]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_clipcat-notify_commands" \
"*::: :->clipcat-notify" \
&& ret=0
    case $state in
    (clipcat-notify)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:clipcat-notify-command-$line[1]:"
        case $line[1] in
            (version)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
":: :_clipcat-notify__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:clipcat-notify-help-command-$line[1]:"
        case $line[1] in
            (version)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_clipcat-notify_commands] )) ||
_clipcat-notify_commands() {
    local commands; commands=(
'version:Print version information' \
'completions:Output shell completion code for the specified shell (bash, zsh, fish)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'clipcat-notify commands' commands "$@"
}
(( $+functions[_clipcat-notify__completions_commands] )) ||
_clipcat-notify__completions_commands() {
    local commands; commands=()
    _describe -t commands 'clipcat-notify completions commands' commands "$@"
}
(( $+functions[_clipcat-notify__help__completions_commands] )) ||
_clipcat-notify__help__completions_commands() {
    local commands; commands=()
    _describe -t commands 'clipcat-notify help completions commands' commands "$@"
}
(( $+functions[_clipcat-notify__help_commands] )) ||
_clipcat-notify__help_commands() {
    local commands; commands=(
'version:Print version information' \
'completions:Output shell completion code for the specified shell (bash, zsh, fish)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'clipcat-notify help commands' commands "$@"
}
(( $+functions[_clipcat-notify__help__help_commands] )) ||
_clipcat-notify__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'clipcat-notify help help commands' commands "$@"
}
(( $+functions[_clipcat-notify__help__version_commands] )) ||
_clipcat-notify__help__version_commands() {
    local commands; commands=()
    _describe -t commands 'clipcat-notify help version commands' commands "$@"
}
(( $+functions[_clipcat-notify__version_commands] )) ||
_clipcat-notify__version_commands() {
    local commands; commands=()
    _describe -t commands 'clipcat-notify version commands' commands "$@"
}

if [ "$funcstack[1]" = "_clipcat-notify" ]; then
    _clipcat-notify "$@"
else
    compdef _clipcat-notify clipcat-notify
fi
