@@ -336,8 +336,8 @@ _RE_CMD_SPACE="^($CMD_PREFIXES) "
336336_RE_CMD_END= " ^($CMD_PREFIXES )( |$)"
337337_RE_INDENTED_CMD= " ^[[:space:]]*(\\\$ [[:space:]]+)?($CMD_PREFIXES )( |$)"
338338
339- # Extract backtick-wrapped commands from a line of text.
340- # Sets _FBC_RESULT (newline-separated) instead of printing to stdout.
339+ # Extract backtick-wrapped commands from a line of text
340+ # Sets _FBC_RESULT (newline-separated) instead of printing to stdout
341341# Usage: find_backtick_commands "text" [require_args]
342342# require_args=true (default) - prefix must be followed by a space (prose)
343343# require_args=false - bare prefix allowed (headings like `make`)
@@ -359,8 +359,8 @@ find_backtick_commands() {
359359 done
360360}
361361
362- # Strip shell prompt prefixes ($ or %) from fenced code block lines.
363- # The regex requires whitespace after $ so "$HOME/bin" is never mangled.
362+ # Strip shell prompt prefixes ($ or %) from fenced code block lines
363+ # The regex requires whitespace after $ so "$HOME/bin" is never mangled
364364# Sets _SP_RESULT instead of printing to stdout (avoids subshell per call).
365365strip_prompt () {
366366 if [[ " $1 " =~ ^[[:space:]]* [\$ %][[:space:]]+ (.* ) ]]; then
@@ -370,12 +370,12 @@ strip_prompt() {
370370 fi
371371}
372372
373- # Extract commands from section body text.
374- # Sets _EC_RESULT instead of printing to stdout (avoids subshell per call).
373+ # Extract commands from section body text
374+ # Sets _EC_RESULT instead of printing to stdout (avoids subshell per call)
375375#
376376# When _EC_GROUPED=true, sub-headings (##+ ) and bold pseudo-headings
377377# (**text**) in the prose are emitted as marker lines prefixed with \x01
378- # so the caller can create display sub-groups without a second pass.
378+ # so the caller can create display sub-groups without a second pass
379379_EC_GROUPED= false
380380_EC_SUBHDR= $' \x01 '
381381
@@ -561,9 +561,9 @@ build_display_list() {
561561 done <<< " $title_cmds"
562562 fi
563563
564- # Extract commands with sub-group markers (single pass over the body).
564+ # Extract commands with sub-group markers (single pass over the body)
565565 # Sub-headings and bold pseudo-headings produce \x01-prefixed marker
566- # lines; everything else is a command or empty line.
566+ # lines; everything else is a command or empty line
567567 _EC_GROUPED=true
568568 extract_commands " $body "
569569 _EC_GROUPED=false
@@ -1052,9 +1052,9 @@ run_interactive() {
10521052# Shell builtins and coreutils that are always available - not worth checking
10531053_CHECK_SKIP= " ^(cd|cp|mv|rm|mkdir|echo|export|source|cat|chmod|chown|ln|touch|ls|printf|trap|pwd|set|unset|eval|exec|exit|return|read|test|true|false|tee|head|tail|wc|sort|grep|xargs|find|tar|gzip|gunzip|sed|awk|tr|cut|diff|date|sleep|kill|whoami|env|which|man|less|more)$"
10541054
1055- # Extract the tool name from a command string.
1056- # Strips leading env vars (FOO=bar) and sudo, returns the first word.
1057- # Sets _CT_RESULT or "" if nothing useful.
1055+ # Extract the tool name from a command string
1056+ # Strips leading env vars (FOO=bar) and sudo, returns the first word
1057+ # Sets _CT_RESULT or "" if nothing useful
10581058_check_tool_name () {
10591059 local cmd=" $1 "
10601060
@@ -1145,7 +1145,7 @@ run_check() {
11451145
11461146# ── JSON output ───────────────────────────────────────────────────────────────
11471147
1148- # Escape a string for safe embedding in JSON.
1148+ # Escape a string for safe embedding in JSON
11491149_json_esc () {
11501150 local s=" $1 "
11511151 s=" ${s// \\ / \\\\ } "
@@ -1155,7 +1155,7 @@ _json_esc() {
11551155 printf ' %s' " $s "
11561156}
11571157
1158- # Set PATTERN for a given mode name (mirrors the case in args.sh).
1158+ # Set PATTERN for a given mode name (mirrors the case in args.sh)
11591159_json_set_pattern () {
11601160 case " $1 " in
11611161 install) PATTERN=" ($KW_INSTALL )" ;;
@@ -1166,8 +1166,8 @@ _json_set_pattern() {
11661166 esac
11671167}
11681168
1169- # Print the modes display-list array as JSON for the current DISPLAY_LINES.
1170- # Skips trailing blank separators (empty type + empty text).
1169+ # Print the modes display-list array as JSON for the current DISPLAY_LINES
1170+ # Skips trailing blank separators (empty type + empty text)
11711171_json_display_list () {
11721172 local mode=" $1 "
11731173 printf ' "%s": [' " $mode "
@@ -1183,7 +1183,7 @@ _json_display_list() {
11831183 printf ' \n ]'
11841184}
11851185
1186- # Print the fullProse array as JSON for the current SECTION_TITLES/BODIES.
1186+ # Print the fullProse array as JSON for the current SECTION_TITLES/BODIES
11871187_json_full_prose () {
11881188 local mode=" $1 "
11891189 printf ' "%s": [' " $mode "
@@ -1195,7 +1195,7 @@ _json_full_prose() {
11951195 printf ' \n {"type": "%s", "text": "%s"}' " $1 " " $( _json_esc " $2 " ) "
11961196 }
11971197
1198- # Render a plain prose line (not inside a code block).
1198+ # Render a plain prose line (not inside a code block)
11991199 _fp_prose_line () {
12001200 local l=" $1 "
12011201 # Empty / whitespace-only
@@ -1306,7 +1306,7 @@ _json_full_prose() {
13061306 printf ' \n ]'
13071307}
13081308
1309- # Print the check array as JSON using the current DISPLAY_LINES.
1309+ # Print the check array as JSON using the current DISPLAY_LINES
13101310_json_check () {
13111311 local -a tools=()
13121312 local tool
@@ -1345,7 +1345,7 @@ _json_check() {
13451345 printf ' \n ]'
13461346}
13471347
1348- # Main JSON renderer: outputs all modes, fullProse, and check.
1348+ # Main JSON renderer: outputs all modes, fullProse, and check
13491349render_json () {
13501350 local _modes=(" default" " install" " run" " test" " deploy" " all" )
13511351 local first
0 commit comments