Browse Source

punk::args 0.4.0: internals to private ns, dev-test procs culled, full PUNKARGS coverage; project 0.4.13

Pre-G-046 tidy-up of punk::args:
- deleted dead developer procs define2, parseXXX and the unused ::punk::args::TEST definition
- Get_caller diagnostics renamed __test_get_dict/__test_get_by_id/__test_callers (+ __test1 id)
  and lib tstr demo renamed __tstr_test_one - unexported (punk::args::lib now exports {[a-z]*})
- new internal namespace punk::args::private (namespace path punk::args + lib + system):
  _get_dict_can_assign_value, _split_type_expression, _check_clausecolumn,
  _synopsis_form_arg_display, _argerror_load_colours and lib::_parse_tstr_parts moved there
  with underscore prefixes dropped; argerror_load_colours reaches arg_error_CLR* state via upvar
- PUNKARGS definitions added for every remaining exported command (main ns incl. get_dict and
  choiceword_match; lib utilities; helpers and argdocbase B/N/I/NI); resolve's empty -help filled;
  punk::args::argdocbase added to registered definition namespaces
- tests: punk/args suite 127 pass + 1 known skip, punk/ns suite 28/28 (tcl87)

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 5 days ago
parent
commit
52dab2457d
  1. 4
      CHANGELOG.md
  2. 6
      punkproject.toml
  3. 764
      src/modules/punk/args-999999.0a1.0.tm
  4. 3
      src/modules/punk/args-buildversion.txt

4
CHANGELOG.md

@ -5,6 +5,10 @@ The latest `## [X.Y.Z]` header must match the `version` field in `punkproject.to
Entries are newest-first; one bullet per notable change. See the root `AGENTS.md`
"Project Versioning" section for the bump policy.
## [0.4.13] - 2026-07-09
- punk::args 0.4.0 tidy-up (pre G-046): dead developer-test procs removed (`define2`, `parseXXX`, the unused `::punk::args::TEST` definition); the interactive `Get_caller` diagnostics and `lib::tstr_test_one` renamed with leading `__` and unexported; internal parser/renderer helpers moved from the exported `punk::args` namespace into a new internal `punk::args::private` namespace (underscore prefixes dropped); every remaining exported command now carries a PUNKARGS definition, so `i`/`punk::args::usage` render documentation for the whole punk::args API (including `punk::args::lib` utilities and the `helpers`/`argdocbase` ANSI shorthands).
## [0.4.12] - 2026-07-09
- Tcl 9.1b0 runtime compatibility (first `punk91.exe` build on `tclsfe-x64`; the developed baseline remains Tcl 9.0.2):

6
punkproject.toml

@ -1,3 +1,3 @@
[project]
name = "punkshell"
version = "0.4.12"
[project]
name = "punkshell"
version = "0.4.13"

764
src/modules/punk/args-999999.0a1.0.tm

File diff suppressed because it is too large Load Diff

3
src/modules/punk/args-buildversion.txt

@ -1,6 +1,7 @@
0.3.2
0.4.0
#First line must be a semantic version number
#all other lines are ignored.
#0.4.0 - tidy-up (pre G-046): removed dead developer-test procs define2 and parseXXX and the unused ::punk::args::TEST definition; renamed the interactive Get_caller diagnostics test_get_dict/test_get_by_id/test_callers (+ test1 id) and lib::tstr_test_one with leading double underscores and excluded them from exports (punk::args::lib now exports {[a-z]*} instead of *). new punk::args::private namespace (namespace path to punk::args/lib/system) for internal helpers - _get_dict_can_assign_value, _split_type_expression, _check_clausecolumn, _synopsis_form_arg_display, _argerror_load_colours and lib::_parse_tstr_parts moved there with underscore prefixes dropped. documentation: PUNKARGS definitions added for every remaining exported command (errorstyle, undefine, undefine_deflist, raw_def, resolved_def_values, get_spec, is_dynamic, rawdef_id, rawdef_is_dynamic, id_exists, idaliases, set_idalias, unset_idalias, get_idalias, id_query, real_id, status, choiceword_match, get_dict; lib: string_is_dict, flatzip, zero_based_posns, choiceinfo_marks, indent, undent, undentleader, longestCommonPrefix, lunique; helpers and argdocbase B/N/I/NI); resolve's empty @cmd -help filled in; punk::args::argdocbase added to the registered definition namespaces
#0.3.2 - Tcl 9.1 compatibility (TIP 746 removed expr behaviour from lseq operands): zero_based_posns now wraps its count-1 operand in expr
#0.3.1 - fixed helpers::example -title path calling bare [a] (only resolvable where a global 'a' alias exists, e.g. punk shells) - now punk::ansi::a; found by the new examples.test running under plain tclsh
#0.3.0 - new: -choicealiases {alias canonical ...} argument option (G-040) - aliases accepted exact under any -choiceprefix/-nocase setting, join the prefix-calculation pool when -choiceprefix is true, and normalize to their canonical choice in parse results; deny applies to the matched name (alias deny requires full alias; canonical reached via alias exempt from the canonical's own deny); usage display folds aliases into the canonical entry's label as an (alias:...) note and includes alias names in display prefix calculation; alias->existing-choice and no-collision validated at definition resolve. new public helper punk::args::choiceword_match - the single choice-word matching implementation extracted from get_dict, also consumed by punk::ns cmd_traverse for doc-lookup parity

Loading…
Cancel
Save