Index: nxsh.in =================================================================== diff -u -ra1f1c17c221b7f92384107a7acea8197dba957fb -r4bf0e8a0dc38bb3afda612c028abaa714fe086e1 --- nxsh.in (.../nxsh.in) (revision a1f1c17c221b7f92384107a7acea8197dba957fb) +++ nxsh.in (.../nxsh.in) (revision 4bf0e8a0dc38bb3afda612c028abaa714fe086e1) @@ -14,38 +14,7 @@ # Tiny scripted replacement of a binary nxsh. This script can be used # as interactive shell for testing or like a regular shell with the !# # markup in the first line of a script. It is designed to work with -# multiple installed shells during development. For installed -# versions, it should be sufficient to remove the first line. +# multiple installed Tcl shells during development. # -package require nx -namespace import ::nx::* - -if {$argc == 0} { - set prefix "" - set line "" - while {1} { - if {$line eq ""} { - puts -nonewline "% " - flush stdout - } - append line [gets stdin] - if {[info complete $line]} { - if {[catch $line result]} { - puts $::errorInfo - } else { - puts $result - } - set line "" - continue - } - append line \n - } -} else { - set argv0 [lindex $argv 0] - set argv [lreplace $argv 0 0] - incr argc -1 - source $argv0 - #if {[catch [list source $argv0] errorMsg]} { - # return -code error -level 1 $errorMsg - #} -} +package require nx::shell +nx::shell run $argc $argv Index: nxwish.in =================================================================== diff -u -rf6b33f642a1d30f8d7b44c556c86302f8539be3c -r4bf0e8a0dc38bb3afda612c028abaa714fe086e1 --- nxwish.in (.../nxwish.in) (revision f6b33f642a1d30f8d7b44c556c86302f8539be3c) +++ nxwish.in (.../nxwish.in) (revision 4bf0e8a0dc38bb3afda612c028abaa714fe086e1) @@ -14,38 +14,10 @@ # Tiny scripted replacement of a binary nxwish (former xowish). This # script can be used as interactive shell for testing or like a # regular shell with the !# markup in the first line of a script. It -# is designed to work with multiple installed shells during -# development. For installed versions, it should be sufficient to -# remove the first line. +# is designed to work with multiple installed Tcl shells during +# development. # -package require Tk -package require nx -namespace import ::nx::* -if {$argc == 0} { - set prefix "" - set line "" - while {1} { - update - if {$line eq ""} { - puts -nonewline "% " - flush stdout - } - append line [gets stdin] - if {[info complete $line]} { - if {[catch $line result]} { - puts $::errorInfo - } else { - puts $result - } - set line "" - continue - } - append line \n - } -} else { - set argv0 [lindex $argv 0] - set argv [lreplace $argv 0 0] - incr argc -1 - source $argv0 -} +package require Tk +package require nx::shell +nx::shell run $argc $argv