#wrap to terminal width, so line lengths here directly set the table width
set basehelp {Help system for the punk shell.
set basehelp {Help system for the punk shell.
With no arguments - an overview of some key shell commands is displayed.
With no arguments - an overview of some key shell
When the first argument is a recognised topic - help for that topic is displayed.
commands is displayed.
When the first argument is a recognised topic - help
for that topic is displayed.
('help topics' lists the available topics)
('help topics' lists the available topics)
Anything else is treated as a command name - basic command info (type and
Anything else is treated as a command name - basic
synopsis) is shown for a resolvable command, or the resolved path for an
command info (type and synopsis) is shown for a
resolvable command, or the resolved path for an
external executable.}
external executable.}
set topichelp {Help topic, or command words for basic command info. (topics must match exactly - no prefix matching)}
set topichelp "Help topic, or command words for basic command info.\n(topics must match exactly - no prefix matching)"
set specs [list]
set specs [list]
lappend specs ::punk::help help "Punk shell help system." ""
lappend specs ::punk::help help "Punk shell help system." ""
lappend specs ::punk::help_chunks punk::help_chunks "Punk shell help system - content as {channel text} chunks." "\n\nhelp_chunks returns the help content as a list of{channel text} chunks rather than emitting it."
lappend specs ::punk::help_chunks punk::help_chunks "Punk shell help system - content as {channel text} chunks." "\n\nhelp_chunks returns the help content as a list of\n{channel text} chunks rather than emitting it."
#quiet undefine - redefinition on registry change is expected, not noteworthy
#quiet undefine - redefinition on registry change is expected, not noteworthy
@ -8548,7 +8553,12 @@ namespace eval punk {
punk::args::define {
punk::args::define {
@id -id ::punk::helptopic::topics
@id -id ::punk::helptopic::topics
@cmd -name "help topics" -summary "List help topics." -help "Show the table of topics known to the help system, including registered aliases for each topic."
@cmd -name "help topics"\
-summary\
"List help topics."\
-help\
"Show the table of topics known to the help system,
including registered aliases for each topic."
@values -min 0 -max 0
@values -min 0 -max 0
}
}
proc topics {context args} {
proc topics {context args} {
@ -8570,7 +8580,15 @@ namespace eval punk {
punk::args::define {
punk::args::define {
@id -id ::punk::helptopic::tcl
@id -id ::punk::helptopic::tcl
@cmd -name "help tcl" -summary "Tcl version warnings." -help "Show the running Tcl patchlevel and build-info, with warnings for known Tcl bugs affecting this interpreter (as detected by the punk::lib::check::has_tclbug_* checks)."
@cmd -name "help tcl"\
-summary\
"Tcl version warnings."\
-help\
"Show the running Tcl patchlevel and build-info, with
warnings for known Tcl bugs affecting this interpreter
and known bugs in bundled library packages
(as detected by the punk::lib::check::has_tclbug_*
and has_libbug_* checks)."
@values -min 0 -max 0
@values -min 0 -max 0
}
}
proc tcl {context args} {
proc tcl {context args} {
@ -8580,8 +8598,12 @@ namespace eval punk {
catch {
catch {
append text \n "Tcl build-info: [::tcl::build-info]"
append text \n "Tcl build-info: [::tcl::build-info]"
}
}
#generate warningblocks for each triggered Tcl bug in namespace ::punk::lib::check
#generate warningblocks for each triggered bug check in namespace ::punk::lib::check
set bugcheck_procs [info procs ::punk::lib::check::has_tclbug*]
@cmd -name "help env" -summary "punkshell environment vars." -help "Show punk-related and other relevant environment variables with their current values."
@cmd -name "help env"\
-summary\
"punkshell environment vars."\
-help\
"Show punk-related and other relevant environment
variables with their current values."
@values -min 0 -max 0
@values -min 0 -max 0
}
}
proc env {context args} {
proc env {context args} {
@ -8723,7 +8753,14 @@ namespace eval punk {
punk::args::define {
punk::args::define {
@id -id ::punk::helptopic::console
@id -id ::punk::helptopic::console
@cmd -name "help console" -summary "Console behaviour tests and warnings." -help "Run some console/terminal behaviour tests (control string hiding, grapheme cluster support, cursor position query timing) and report warnings. Requires a responsive interactive console."
@cmd -name "help console"\
-summary\
"Console behaviour tests and warnings."\
-help\
"Run some console/terminal behaviour tests (control
#tcludp <= 1.0.12 on Windows: the per-thread exit handler UDP_ExitProc closes the
#PROCESS-GLOBAL sockListLock/waitForSock event handles. The first udp-loaded thread to
#exit corrupts the lock for every other udp-loaded thread - their event loops block
#forever in WaitForSingleObject on a dead or recycled handle (timers and thread::send
#unserviced). In punkshell the visible casualty is syslog log workers silently freezing
#(the original exit/quit hang this caused is separately mitigated). Root-caused
#2026-07-08 - see goal G-036 detail. Fixed upstream in tcludp 1.0.13 (per-thread
#UdpThreadExitProc deletes only the event source; ExitSockets closes the events at
#process exit).
#Version-based detection only (per G-036 acceptance) - no behavioural probe.
set udpversion [package provide udp]
if {$udpversion eq ""} {
#not loaded - determine what version would be provided, without loading the binary:
#an unsatisfiable require triggers the package unknown scan (registering ifneeded
#scripts) then fails before any dll load.
catch {package require udp 999999}
set available [package versions udp]
if {[llength $available]} {
set udpversion [lindex [lsort -command {package vcompare} $available] end]
}
}
set bug [libbug_udp_threadexit_applies $udpversion $::tcl_platform(platform) [package provide Tcl]]
if {$udpversion eq ""} {
set verinfo "no udp package found"
} else {
set verinfo "udp $udpversion"
}
set description "tcludp < 1.0.13 on Tcl 9 Windows ($verinfo): the udp package's per-thread exit\nhandler closes process-global event handles - after any udp-using thread exits, every\nother udp-using thread's event loop can freeze silently (e.g. syslog log workers stop).\nUpgrade the bundled/available udp package to 1.0.13+ (see goal G-036)."