oaspec

Values

pub fn main() -> Nil

CLI entry point for the oaspec code generator.

Routes diagnostic output to stderr while keeping requested output (such as --help text) on stdout, following POSIX/CLIG conventions.

pub fn normalize_argv(arguments: List(String)) -> List(String)

Translate --name value into --name=value for the value-bearing long options listed in cli.value_flag_names. glint 1.x only accepts the =-joined form, so users who reach for the GNU --name value convention (or who copy commands from git/gh/cargo muscle memory) hit invalid flag '<name>'. The normalisation happens before glint sees the argv so existing --name=value callers are unaffected, and so unknown flags still surface from glint with their original error.

Other shapes are passed through untouched:

  • --name=value: already canonical (the name has = in it, so no match)
  • --bool-flag: not in the value-bearing list
  • --name -other: a --prefixed value is treated as the next flag, so the original (broken) call is preserved and glint reports it as before
Search Document