#compdef pudb

# AUTOMATICALLY GENERATED by `shtab`


_shtab_pudb_commands() {
  local _commands=(
    
  )
  _describe 'pudb commands' _commands
}

_shtab_pudb_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "(- : *)--print-completion[print shell completion script]:print_completion:(bash zsh tcsh)"
  {-c,--continue}"[Let the script run until an exception occurs or a breakpoint is hit]"
  {-s,--steal-output}"[]"
  {-m,--module}"[Debug as module or package instead of as a script]"
  {-le,--log-errors}"[Log internal errors to the given file]:log_errors:_files"
  "--pre-run[Run command before each program run]:pre_run:{_command_names -e}"
  "(- : *)--version[show program\'s version number and exit]"
  "(-)*:Arguments to pass to script or module:_script_args"
)


_shtab_pudb() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_pudb_options[(I)${(q)one_or_more}*]} + ${_shtab_pudb_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_pudb_options+=(': :_shtab_pudb_commands' '*::: :->pudb')
  fi
  _arguments -C -s $_shtab_pudb_options

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

# Custom Preamble
_script_args() {
  # pudb -m <TAB>
  if (($words[(I)-m] == $#words - 1)); then
    _python_modules
  # pudb -m XXX <TAB>
  elif (($words[(I)-m])); then
    _files
  # pudb <TAB>
  else
    _arguments -S -s '(-)1:script_args:_files -g "*.py"' '*: :_files'
  fi
}

# End Custom Preamble


typeset -A opt_args

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

