#compdef vcspull

# AUTOMATICALLY GENERATED by `shtab`


_shtab_vcspull_commands() {
  local _commands=(
    "sync:sync vcs repos"
  )
  _describe 'vcspull commands' _commands
}

_shtab_vcspull_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "(- : *)"{--version,-V}"[show program\'s version number and exit]"
  "--log-level[log level (debug, info, warning, error, critical)]:log_level:"
)

_shtab_vcspull_sync_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {--config,-c}"[optional filepath to specify vcspull config]:config:_files"
  {--exit-on-error,-x}"[exit immediately encountering error (when syncing multiple repos)]"
  "(*)::patterns \/ terms of repos, accepts globs \/ fnmatch(3):"
)


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

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

  case $state in
    vcspull)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_vcspull-$line[1]:"
      case $line[1] in
        sync) _arguments -C -s $_shtab_vcspull_sync_options ;;
      esac
  esac
}



typeset -A opt_args

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

