#compdef shtab

# AUTOMATICALLY GENERATED by `shtab`


_shtab_shtab_commands() {
  local _commands=(
    
  )
  _describe 'shtab commands' _commands
}

_shtab_shtab_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "(- : *)--version[show program\'s version number and exit]"
  {-s,--shell}"[]:shell:(bash zsh tcsh)"
  {-o,--output}"[output file (- for stdout)]:output:"
  "--prefix[prepended to generated functions to avoid clashes]:prefix:"
  "--preamble[prepended to generated script]:preamble:"
  "--prog[custom program name (overrides \`parser.prog\`)]:prog:"
  {-u,--error-unimportable}"[raise errors if \`parser\` is not found in \$PYTHONPATH]"
  "--verbose[Log debug information]"
  "(- : *)--print-own-completion[print shtab\'s own completion]:print_own_completion:(bash zsh tcsh)"
  ":importable parser (or function returning parser):"
)

# guard to ensure default positional specs are added only once per session
_shtab_shtab_defaults_added=0


_shtab_shtab() {
  local context state line curcontext="$curcontext" one_or_more='(*)' remainder='(-)*' default='*::: :->shtab'

  # Add default positional/remainder specs only if none exist, and only once per session
  if (( ! _shtab_shtab_defaults_added )); then
    if (( ${_shtab_shtab_options[(I)${(q)one_or_more}*]} +          ${_shtab_shtab_options[(I)${(q)remainder}*]} +          ${_shtab_shtab_options[(I)${(q)default}]} == 0 )); then
      _shtab_shtab_options+=(': :_shtab_shtab_commands' '*::: :->shtab')
    fi
    _shtab_shtab_defaults_added=1
  fi
  _arguments -C -s $_shtab_shtab_options

  case $state in
    shtab)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_shtab-$line[1]:"
      case $line[1] in
        
      esac
  esac
}



typeset -A opt_args

if [[ $zsh_eval_context[-1] == eval ]]; then
  # eval/source/. command, register function for later
  compdef _shtab_shtab -N shtab
else
  # autoload from fpath, call function directly
  _shtab_shtab "$@"
fi

