awkrs 0.1.2

Awk implementation in Rust with broad CLI compatibility and parallel record processing when safe
Documentation
#compdef awkrs ars

# Zsh completion for awkrs — awk-compatible pattern-directed scanning and processing

_awkrs_lint_values() {
  local -a vals=(
    'fatal:Treat lint warnings as fatal errors'
    'invalid:Warn about invalid constructs'
    'no-ext:Warn about non-POSIX extensions'
  )
  _describe 'lint level' vals
}

_awkrs() {
  local curcontext="$curcontext" ret=1

  _arguments -s -S \
    '-f+[Read program from file]:program file:_files' \
    '--file=[Read program from file]:program file:_files' \
    '-F+[Set field separator]:field separator:' \
    '--field-separator=[Set field separator]:field separator:' \
    '*-v+[Assign variable before execution]:var=val:' \
    '*--assign=[Assign variable before execution]:var=val:' \
    '*-e+[Program source text]:program text:' \
    '*--source=[Program source text]:program text:' \
    '*-i+[Include awk source file]:include file:_files' \
    '*--include=[Include awk source file]:include file:_files' \
    '-b[Treat characters as bytes]' \
    '--characters-as-bytes[Treat characters as bytes]' \
    '-c[Use traditional POSIX awk]' \
    '--traditional[Use traditional POSIX awk]' \
    '-C[Print copyright info]' \
    '--copyright[Print copyright info]' \
    '-d+[Dump variables to file]:dump file:_files' \
    '--dump-variables=[Dump variables to file]:dump file:_files' \
    '-D+[Debug mode with file]:debug file:_files' \
    '--debug=[Debug mode with file]:debug file:_files' \
    '-E+[Execute program from file then exit]:exec file:_files' \
    '--exec=[Execute program from file then exit]:exec file:_files' \
    '-g[Generate .pot file for i18n]' \
    '--gen-pot[Generate .pot file for i18n]' \
    '-I[Trace execution]' \
    '--trace[Trace execution]' \
    '-k[Enable CSV field parsing]' \
    '--csv[Enable CSV field parsing]' \
    '*-l+[Load shared library]:library name:' \
    '*--load=[Load shared library]:library name:' \
    '-L+[Lint level]:lint level:_awkrs_lint_values' \
    '--lint=[Lint level]:lint level:_awkrs_lint_values' \
    '-M[Enable arbitrary precision arithmetic]' \
    '--bignum[Enable arbitrary precision arithmetic]' \
    '-N[Use locale decimal point]' \
    '--use-lc-numeric[Use locale decimal point]' \
    '-n[Allow non-decimal input data]' \
    '--non-decimal-data[Allow non-decimal input data]' \
    '-o+[Pretty-print program to file]:output file:_files' \
    '--pretty-print=[Pretty-print program to file]:output file:_files' \
    '-O[Optimize program]' \
    '--optimize[Optimize program]' \
    '-p+[Profile to file]:profile file:_files' \
    '--profile=[Profile to file]:profile file:_files' \
    '-P[Strict POSIX mode]' \
    '--posix[Strict POSIX mode]' \
    '-r[Enable interval expressions in regexes]' \
    '--re-interval[Enable interval expressions in regexes]' \
    '-s[Disable optimizations]' \
    '--no-optimize[Disable optimizations]' \
    '-S[Sandbox mode (disable I/O redirections)]' \
    '--sandbox[Sandbox mode (disable I/O redirections)]' \
    '-t[Lint old-style awk constructs]' \
    '--lint-old[Lint old-style awk constructs]' \
    '*-W+[mawk-compatible option]:mawk option:(help usage version exec=)' \
    '-j+[Thread count for internal pools]:thread count:' \
    '--threads=[Thread count for internal pools]:thread count:' \
    '--read-ahead=[Read-ahead queue depth (lines)]:queue depth:' \
    '-h[Print help]' \
    '--help[Print help]' \
    '-V[Print version]' \
    '--version[Print version]' \
    '*:input file:_files' \
  && ret=0

  return ret
}

_awkrs "$@"