From 54890f72ffefb5205a574790a9b48ad73ce2f719 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Wed, 12 Jun 2024 02:49:12 +1000 Subject: [PATCH] missing repl changes --- src/punk86.vfs/lib/app-punk/repl.tcl | 13 ++++++++++--- src/punk86.vfs/lib/app-shellspy/shellspy.tcl | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/punk86.vfs/lib/app-punk/repl.tcl b/src/punk86.vfs/lib/app-punk/repl.tcl index ee65436e..3fc2b640 100644 --- a/src/punk86.vfs/lib/app-punk/repl.tcl +++ b/src/punk86.vfs/lib/app-punk/repl.tcl @@ -98,12 +98,18 @@ if {[llength $currentdir_modules]} { package require Thread catch {package require tcllibc} #These are strong dependencies -# - the repl requires Threading and punk,shellfilter,shellrun to call and display properly. +# - the repl requires Threading and shellfilter to call and display properly. # tm list already indexed - 'package forget' to find modules based on current tcl::tm::list +#set required [list\ +# shellfilter\ +# shellrun\ +# punk\ +# ] + +#punk & shellrun should be in codethreads - but not required in the parent repl threads + set required [list\ shellfilter\ - shellrun\ - punk\ ] catch { @@ -134,6 +140,7 @@ foreach pkg $required { } package require punk::repl +repl::init -safe 0 repl::start stdin -title app-punk diff --git a/src/punk86.vfs/lib/app-shellspy/shellspy.tcl b/src/punk86.vfs/lib/app-shellspy/shellspy.tcl index da8317c3..062c08c4 100644 --- a/src/punk86.vfs/lib/app-shellspy/shellspy.tcl +++ b/src/punk86.vfs/lib/app-shellspy/shellspy.tcl @@ -412,6 +412,7 @@ namespace eval shellspy { package require shellrun package require punk::repl puts stdout "quit to exit" + repl::init -safe 0 repl::start stdin -defaultresult %r% }]] } @@ -714,6 +715,7 @@ source [file normalize $scriptname] #append repl_lines {puts stderr "starting repl [chan names]"} \n #append repl_lines {puts stderr "stdin [chan configure stdin]"} \n append repl_lines {package require punk::repl} \n + append repl_lines {repl::init -safe 0} \n append repl_lines {repl::start stdin} \n #append repl_lines {puts stdout "shutdown message"} \n