|
|
|
@ -35,6 +35,7 @@ package require Thread
|
|
|
|
|
package require shellfilter |
|
|
|
|
package require shellrun |
|
|
|
|
package require punk |
|
|
|
|
package require punk::ns |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1010,7 +1011,7 @@ proc repl::repl_handler {inputchan prompt_config} {
|
|
|
|
|
append info "repl loopinstance: $loopinstance\n" |
|
|
|
|
append info "last_run_info\n" |
|
|
|
|
append info "length: [llength $::punk::last_run_display]\n" |
|
|
|
|
append info "namespace: $punk::ns_current" |
|
|
|
|
append info "namespace: $punk::ns::ns_current" |
|
|
|
|
debug_repl_emit $info |
|
|
|
|
} else { |
|
|
|
|
proc debug_repl_emit {msg} {return} |
|
|
|
@ -1056,9 +1057,9 @@ proc repl::repl_handler {inputchan prompt_config} {
|
|
|
|
|
#puts stderr "repl uplevel 0 '$command'" |
|
|
|
|
set status [catch { |
|
|
|
|
#uplevel 1 $run_command_string |
|
|
|
|
#uplevel 1 {namespace eval $punk::ns_current $run_command_string} |
|
|
|
|
#uplevel 1 {namespace eval $punk::ns::ns_current $run_command_string} |
|
|
|
|
set weirdns 0 |
|
|
|
|
set parts [punk::nsparts $punk::ns_current] |
|
|
|
|
set parts [punk::ns::nsparts $punk::ns::ns_current] |
|
|
|
|
foreach p $parts { |
|
|
|
|
if {[string match :* $p] || [string match *: $p]} { |
|
|
|
|
set weirdns 1 |
|
|
|
@ -1067,9 +1068,9 @@ proc repl::repl_handler {inputchan prompt_config} {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if {$weirdns} { |
|
|
|
|
uplevel 1 {punk::nseval $punk::ns_current $run_command_string} |
|
|
|
|
uplevel 1 {punk::ns::nseval $punk::ns::ns_current $run_command_string} |
|
|
|
|
} else { |
|
|
|
|
uplevel 1 {namespace inscope $punk::ns_current $run_command_string} |
|
|
|
|
uplevel 1 {namespace inscope $punk::ns::ns_current $run_command_string} |
|
|
|
|
} |
|
|
|
|
} raw_result] |
|
|
|
|
} |
|
|
|
@ -1337,7 +1338,7 @@ proc repl::repl_handler {inputchan prompt_config} {
|
|
|
|
|
puts stderr "*> stdin reader active" |
|
|
|
|
} |
|
|
|
|
puts stderr "Attempting restart of repl on input channel: $inputchan" |
|
|
|
|
catch {set ::punk::ns_current "::"} |
|
|
|
|
catch {set ::punk::ns::ns_current "::"} |
|
|
|
|
tailcall repl::start $inputchan |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|