Skip to content

Extend PL<->CLI to include var binding / dispatchMulti global options

Compare
Choose a tag to compare
@c-blake c-blake released this 22 Feb 13:05
· 64 commits to master since this release
4193f80

The main new feature is binding an outer scope variable to a CLI option which creates a slight backward incompatibility (a new argument after other ident string args positional, suppress, implicitDefault, not at the very end of the list). RELEASE_NOTES.md, test/Vars.nim, & test/FullyAutoMulti.nim go into more detail, but this can be used for a several-times requested feature of global options in dispatchMulti commands. The new in-the-middle argument should only impact code that fully wraps dispatch/dispatchGen which may be none outside cligen.nim itself as anyone else is likely to use named parameters/keyword args for a 20-parameter call.

This release also fixes a bug and stray debug print in -d:cgCfgToml mode which alters the config file syntax of the [color] section. That also constitutes a minor mode-specific backward incompatibility. Together the two "maybe kinda breaking" induce a minor version bump.

This version also fixes several bugs:

  • rare rounding bugs in fmtUncertain*
  • cligen/dents bug related to lstats
    and adds a few small features:
  • mslice.initSep grows an ability to not backslash-escape TAB, newline, and NUL
  • Tiny MacroCallX API to make non-allocating tmpl renderers easy
  • Add a low cost Nim Slice/HSlice -> MSlice converter so someMs[a..<b] works