Browse Source

punk::ansi 0.1.3: grepstr summarydict linemap doc reconciliation (doc-only)

The -return summarydict choicelabel claimed the linemap key appears only when
-n is supplied - actual behaviour (pinned in ansi/grepstr.test since the
characterization wave) is that linemap is always present. Help text corrected
to match; deferred-to-the-hygiene-pass item from the grepstr characterization.
ansi suites 63/63 green. buildversion 0.1.2 -> 0.1.3; project 0.12.35 +
CHANGELOG.

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 12 hours ago
parent
commit
bc647968e9
  1. 4
      CHANGELOG.md
  2. 2
      punkproject.toml
  3. 15
      src/modules/punk/ansi-999999.0a1.0.tm
  4. 3
      src/modules/punk/ansi-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` Entries are newest-first; one bullet per notable change. See the root `AGENTS.md`
"Project Versioning" section for the bump policy. "Project Versioning" section for the bump policy.
## [0.12.35] - 2026-07-14
- punk::ansi 0.1.3 (documentation-only): grepstr's -return summarydict help corrected - the summary dict's linemap key is always present (the old text claimed it appeared only with -n; the always-present behaviour is pinned in ansi/grepstr.test). This was the doc/behaviour reconciliation deferred from the grepstr characterization wave to the punk::ns hygiene pass.
## [0.12.34] - 2026-07-14 ## [0.12.34] - 2026-07-14
- punk::ns 0.7.0/0.7.1 comment/documentation hygiene pass + pinned-wart fixes: ~1200 lines of dead code removed (the fully commented-out arginfo predecessor of cmdhelp, the never-exported name-primitive twins nsparts1/nsprefix1/nsprefix_orig/nstail1/nstail_orig whose divergence was pinned before removal, obsolete nsglob_as_re1, empty stubs, misc commented remnants); stale docs corrected (nsprefix :::a comment, nsglob_as_re 'should be fixed' note, nstree_list empty PUNKARGS help, cmdhelp/corp help typos). Shell-visible fixes (0.7.1, pins flipped): bare `nslist` (no -types) now displays all member types instead of erroring with a malformed literal-$known_types message; nsjoinall's absolute-path error is now prefixed 'nsjoinall:' (was 'nsjoin:'); a development trace puts removed from nscommands' weird-namespace path. Flagged unchanged: get_nslist's apparently-unreachable alias display branches, superseded nscommands1/nscommands2 aliases, cmdtrace output noise (deferred to proposed G-085). - punk::ns 0.7.0/0.7.1 comment/documentation hygiene pass + pinned-wart fixes: ~1200 lines of dead code removed (the fully commented-out arginfo predecessor of cmdhelp, the never-exported name-primitive twins nsparts1/nsprefix1/nsprefix_orig/nstail1/nstail_orig whose divergence was pinned before removal, obsolete nsglob_as_re1, empty stubs, misc commented remnants); stale docs corrected (nsprefix :::a comment, nsglob_as_re 'should be fixed' note, nstree_list empty PUNKARGS help, cmdhelp/corp help typos). Shell-visible fixes (0.7.1, pins flipped): bare `nslist` (no -types) now displays all member types instead of erroring with a malformed literal-$known_types message; nsjoinall's absolute-path error is now prefixed 'nsjoinall:' (was 'nsjoin:'); a development trace puts removed from nscommands' weird-namespace path. Flagged unchanged: get_nslist's apparently-unreachable alias display branches, superseded nscommands1/nscommands2 aliases, cmdtrace output noise (deferred to proposed G-085).

2
punkproject.toml

@ -1,4 +1,4 @@
[project] [project]
name = "punkshell" name = "punkshell"
version = "0.12.34" version = "0.12.35"
license = "BSD-2-Clause" license = "BSD-2-Clause"

15
src/modules/punk/ansi-999999.0a1.0.tm

@ -1336,6 +1336,8 @@ tcl::namespace::eval punk::ansi {
@leaders -min 0 -max 0 @leaders -min 0 -max 0
@opts @opts
#2026-07-14 Agent-Updated: summarydict choicelabel corrected - the linemap key is ALWAYS present
#(the old text claimed -n-only; behaviour pinned in tests ansi/grepstr.test)
-r|-return -mash true -type string -typesynopsis matched|all -default breaksandmatches -choicecolumns 1 -choices {matched all breaksandmatches summarydict} -choicelabels { -r|-return -mash true -type string -typesynopsis matched|all -default breaksandmatches -choicecolumns 1 -choices {matched all breaksandmatches summarydict} -choicelabels {
"matched"\ "matched"\
" Return only lines that matched." " Return only lines that matched."
@ -1350,13 +1352,12 @@ tcl::namespace::eval punk::ansi {
indicator after the linenumber will only be highlighted for lines with matches, indicator after the linenumber will only be highlighted for lines with matches,
and the following matchcount will indicate zero for non-matching lines." and the following matchcount will indicate zero for non-matching lines."
"summarydict"\ "summarydict"\
" Return a summary dict with keys 'matches', 'matchlines' and 'totallines' giving " Return a summary dict with keys 'matches', 'matchlines', 'totallines' and
the count of matched patterns, lines with matches and total number of lines 'linemap' giving the count of matched patterns, lines with matches, total
respectively. number of lines, and a dict mapping line numbers (1-based) to match counts
If -n is also supplied, the summary dict will also include a 'linemap' key for each line respectively.
with a dict value mapping line numbers (1-based) to match counts for each line. The linemap allows the caller to determine which lines had matches and how
This allows the caller to determine which lines had matches and how many many matches each line had, without returning the matched lines themselves.
matches each line had, without returning the matched lines themselves.
" "
} }
-B|--before-context= -parsekey "--before-context" -default 0 -type integer -typesynopsis num -B|--before-context= -parsekey "--before-context" -default 0 -type integer -typesynopsis num

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

@ -1,4 +1,5 @@
0.1.2 0.1.3
#First line must be a semantic version number #First line must be a semantic version number
#all other lines are ignored. #all other lines are ignored.
#0.1.3 - documentation-only: grepstr -return summarydict choicelabel corrected - the summary dict's 'linemap' key is always present (the old text claimed it appeared only with -n; actual always-present behaviour pinned in tests ansi/grepstr.test). Reconciliation deferred from the grepstr characterization wave to the punk::ns hygiene pass.
#0.1.2 - documentation-only: PUNKARGS argdoc blocks added for punk::ansi::codetype (is_sgr_reset, has_sgr_leadingreset, is_cursor_move_in_line, has_all_effective, get_effective_types, is_gx/is_gx_open/is_gx_close, sgr_merge), punk::ansi::sequence_type (is_Fe7/is_Fe/is_Fe8, is_Fp, is_Fs, is_nF, is_3Fp, is_code7/is_code8/is_code, classify), punk::ansi::ta (detect_in_list, detectcode, detectcode_in_list, detect_g0, detect_open, detect_st_open, detect_csi, detect_sgr, split_at_codes, split_codes, split_codes_single, get_codes_single) and punk::ansi::ansistring (VIEW, COUNT, length, trimleft/trimright/trim, INDEX, INDEXCHAR, RANGE, INSERT, INDEXABSOLUTE, INDEXCOLUMNS, COLUMNINDEX); ::punk::ansi::sequence_type added to punk::args::register NAMESPACES so its argdocs are discoverable #0.1.2 - documentation-only: PUNKARGS argdoc blocks added for punk::ansi::codetype (is_sgr_reset, has_sgr_leadingreset, is_cursor_move_in_line, has_all_effective, get_effective_types, is_gx/is_gx_open/is_gx_close, sgr_merge), punk::ansi::sequence_type (is_Fe7/is_Fe/is_Fe8, is_Fp, is_Fs, is_nF, is_3Fp, is_code7/is_code8/is_code, classify), punk::ansi::ta (detect_in_list, detectcode, detectcode_in_list, detect_g0, detect_open, detect_st_open, detect_csi, detect_sgr, split_at_codes, split_codes, split_codes_single, get_codes_single) and punk::ansi::ansistring (VIEW, COUNT, length, trimleft/trimright/trim, INDEX, INDEXCHAR, RANGE, INSERT, INDEXABSOLUTE, INDEXCOLUMNS, COLUMNINDEX); ::punk::ansi::sequence_type added to punk::args::register NAMESPACES so its argdocs are discoverable

Loading…
Cancel
Save