tclword-wrapinteractivetcldevkit

How to wrap an interactive tclsh session with TclDevKit?


How can I wrap an interactive tclsh session with TclDevKit?

With TclPro this:

prowrap -out shell -uses tclsh -startup "" some.tcl

wraps some.tcl, and when I call ./shell it launches an interactive tclsh session. When typing source some.tcl from that shell it calls the wrapped file. So -startup "" tells TclPro not to use any startup script.

How can I do the same with TclDevKit? I have tried -startup "", but it had no effect.


Solution

  • One method might be to include the Tclx package as one of the wrapped things (IIRC, prowrap supports wrapping it) and to use this as the contents of your startup script:

    package require Tclx
    commandloop -interactive on
    

    Other alternatives that don't require an extra package are listed on the Tcler's Wiki page on commandloop so I'm sure you can find a workaround for this issue easily enough.