#compdef actionlint
# Completion for actionlint — flat command: actionlint [FLAGS] [FILES...] [-]

_actionlint_command_or_file() {
  _alternative \
    'commands:external command:_command_names -e' \
    'files:file:_files'
}

_arguments -S \
  '(-no-color)-color[always enable colorful output]' \
  '(-color)-no-color[disable colorful output]' \
  '-config-file[path to the config file]:config file:_files' \
  '-debug[enable debug output (for development)]' \
  '-format[format error messages with a Go template (e.g. {{json .}})]:Go template:' \
  '*-ignore[ignore error messages matching this regular expression (repeatable)]:regular expression:' \
  '-init-config[generate the default config at .github/actionlint.yaml]' \
  '-oneline[use one line per error]' \
  '-pyflakes[command name or file path of the pyflakes external command]:pyflakes command:_actionlint_command_or_file' \
  '-shellcheck[command name or file path of the shellcheck external command]:shellcheck command:_actionlint_command_or_file' \
  '-stdin-filename[file name to report when reading input from stdin]:stdin filename:_files' \
  '-verbose[enable verbose output]' \
  '(- *)-version[show version and how this binary was installed]' \
  '(- *)'{-h,-help}'[show usage and exit]' \
  '*:workflow file:_files -g "*.(yml|yaml)"'
