From c8fd165189f7de0eeb57dd562f670d73a778c16c Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Tue, 4 Aug 2026 02:35:30 +1000 Subject: [PATCH] vfscommonupdate: promote app-punkscript 1.1 + boot core 0.4.0 + moduledoc punkexe 0.5.0 (G-077); swept commandstack 0.7.0 + tcltestrun 0.4.1 make.tcl packages + vfscommonupdate outputs (punkcheck-managed): - app-punkscript 1.0 -> 1.1 and punkboot/core.tcl 0.3.0 -> 0.4.0 (the G-077 -e one-liner surfaces) - punk/args/moduledoc/punkexe 0.4.0 -> 0.5.0 (G-077 documented forms) - swept promotions recorded as left-to-next-cycle by their commits: commandstack 0.6.0 -> 0.7.0 (git 31c0cd04) and punk/tcltestrun 0.3.1 -> 0.4.1 (git 977eade5) kits punk902z/punksys/punk86 rebaked from this payload (bin/ outputs untracked) Assisted-by: harness=opencode; primary-model=openrouter/moonshotai/kimi-k3; api-location=openrouter.ai --- .../lib/app-punkscript/pkgIndex.tcl | 2 +- .../lib/app-punkscript/punkscript.tcl | 39 ++- ...ndstack-0.6.0.tm => commandstack-0.7.0.tm} | 228 +++++++++++++++++- .../{punkexe-0.4.0.tm => punkexe-0.5.0.tm} | 160 +++++++----- ...cltestrun-0.3.1.tm => tcltestrun-0.4.1.tm} | 110 ++++++++- src/vfs/_vfscommon.vfs/punkboot/core.tcl | 46 ++-- 6 files changed, 489 insertions(+), 96 deletions(-) rename src/vfs/_vfscommon.vfs/modules/{commandstack-0.6.0.tm => commandstack-0.7.0.tm} (83%) rename src/vfs/_vfscommon.vfs/modules/punk/args/moduledoc/{punkexe-0.4.0.tm => punkexe-0.5.0.tm} (80%) rename src/vfs/_vfscommon.vfs/modules/punk/{tcltestrun-0.3.1.tm => tcltestrun-0.4.1.tm} (79%) diff --git a/src/vfs/_vfscommon.vfs/lib/app-punkscript/pkgIndex.tcl b/src/vfs/_vfscommon.vfs/lib/app-punkscript/pkgIndex.tcl index 5ba2d15e..f731b9c1 100644 --- a/src/vfs/_vfscommon.vfs/lib/app-punkscript/pkgIndex.tcl +++ b/src/vfs/_vfscommon.vfs/lib/app-punkscript/pkgIndex.tcl @@ -1 +1 @@ -package ifneeded app-punkscript 1.0 [list source [file join $dir punkscript.tcl]] +package ifneeded app-punkscript 1.1 [list source [file join $dir punkscript.tcl]] diff --git a/src/vfs/_vfscommon.vfs/lib/app-punkscript/punkscript.tcl b/src/vfs/_vfscommon.vfs/lib/app-punkscript/punkscript.tcl index 16f1043f..ee579c25 100644 --- a/src/vfs/_vfscommon.vfs/lib/app-punkscript/punkscript.tcl +++ b/src/vfs/_vfscommon.vfs/lib/app-punkscript/punkscript.tcl @@ -1,9 +1,16 @@ -package provide app-punkscript 1.0 +package provide app-punkscript 1.1 #Lean one-shot script runner for the punk executable 'script' subcommand (goal G-015). # #Contract (G-015 - see goals/archive/G-015-script-subcommand-piped-stdin.md): # - runs a script FILE (first argument, remaining arguments become the script's ::argv) # or, with no arguments, the whole of piped/redirected stdin as the script. +# - G-077: a first argument of exactly '-e' runs the SECOND argument as a Tcl +# one-liner (remaining arguments become ::argv, ::argv0 is '-e') - the +# perl/python/node one-liner reflex in the punk script environment. Stock +# tclsh's -e misparse (argv-swallow + stdin read) is never reproduced: '-e' +# with no following script argument is a usage error, and this form never +# reads stdin itself (the one-liner may). A file literally named '-e' stays +# reachable as './-e'. # - the script interp carries the default punk shell module/alias environment # (package punk registers the deck aliases such as 'dev'; punk::aliascore # provides the utility aliases) so one-liners like 'dev projects.work *x*' @@ -68,6 +75,36 @@ apply {{} { catch {package require punk::args::moduledoc::tclcore} set arglist $::argv + if {[llength $arglist] && [lindex $arglist 0] eq "-e"} { + #-e one-liner form (G-077): script -e