|
|
|
@ -28,8 +28,26 @@ proc todo {} {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if {[string match "*.vfs/*" [info script]]} { |
|
|
|
|
#src/xxx.vfs/lib/app-punk/repl.tcl |
|
|
|
|
#back 5 gives same level as src folder |
|
|
|
|
#we assume if calling directly into .vfs that the user would prefer to use src/modules - so back only 4 |
|
|
|
|
set modulefolder [file dirname [file dirname [file dirname [file dirname [info script]]]]]/modules |
|
|
|
|
|
|
|
|
|
tcl::tm::add [pwd]/modules |
|
|
|
|
} else { |
|
|
|
|
set modulefolder [file dirname [info nameofexecutable]]/modules |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if {[file exists $modulefolder]} { |
|
|
|
|
tcl::tm::add $modulefolder |
|
|
|
|
} else { |
|
|
|
|
puts stderr "Warning unable to find module folder at: $modulefolder" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if {[file exists [pwd]/modules]} { |
|
|
|
|
tcl::tm::add [pwd]/modules |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if {![info exists ::env(SHELL)]} { |
|
|
|
|
set ::env(SHELL) punk86 |
|
|
|
@ -48,13 +66,21 @@ if {![info exists ::env(TERM)]} {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package require Thread |
|
|
|
|
#These are strong dependencies |
|
|
|
|
# - the repl requires Threading and punk,shellfilter,shellrun to call and display properly. |
|
|
|
|
# tm list already indexed - need 'package forget' to find modules based on current tcl::tm::list |
|
|
|
|
|
|
|
|
|
package forget shellfilter |
|
|
|
|
package require shellfilter |
|
|
|
|
package forget shellrun |
|
|
|
|
package require shellrun |
|
|
|
|
package require Thread |
|
|
|
|
package forget punk |
|
|
|
|
package require punk |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#todo - move to less generic namespace |
|
|
|
|
namespace eval repl { |
|
|
|
|
variable screen_last_chars "" ;#a small sliding append buffer for last char of any screen output to detect \n vs string |
|
|
|
|