#compdef uncrustify

_uncrustify() {
  _arguments -C \
    '*:file:_files' \
    '-c[Use config file CFG, or defaults if CFG is set to '\''-'\'']' \
    '-f[Process single file FILE, sending output to stdout or file specified]' \
    '-o[Redirect output to FILE]' \
    '--check[Do not output new text, instead verify that nothing changes]' \
    '-F[Read files to process from FILE, one filename per line]' \
    '--prefix[Prepend PFX to output filename path]' \
    '--suffix[Append SFX to output filename. br (default: '\'')]' \
    '--frag[Assume input is a code fragment and first line is properly indented]' \
    '--replace[Replace source files (creates a backup)]' \
    '--no-backup[Replace files, no backup. Useful if files are under source control]' \
    '--if-changed[Write to stdout (or create output FILE) only if a change was detected. br]' \
    '--mtime[Preserve mtime on replaced files]' \
    '-l[Language override: C, CPP, D, CS, JAVA, PAWN, VALA, OC, OC+]' \
    '-t[Load a file with types (usually not needed)]' \
    '-q[Quiet mode - no output on stderr (-L will override)]' \
    {-h,-\?,--help,--usage}'[Print this message and exit]' \
    '--version[Print the version and exit]' \
    '--count-options[Print number of available options and exit]' \
    '--show-config[Print out option documentation and exit]' \
    '--update-config[Output a new config file]' \
    '--update-config-with-doc[Output a new config file with embedded usage comments]' \
    '--universalindent[Output a config file for Universal Indent GUI]' \
    '--detect[Detects config from a source file. Use with '\''-f FILE'\'']' \
    '--tracking[Prepare space tracking information for debugging]' \
    '-p[Dump debug info into FILE, or to stdout if FILE is set to '\''-'\'']' \
    {-ds,--dump-steps}'[Dump parsing info at various moments of formatting process]' \
    '-L[Set log severity (see log_levels. h)]' \
    '-s[Show log severity in the logs]' \
    '--decode[Print FLAG as text and exit]'
}

_uncrustify
