Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (41 sloc) 0.961 kb
#!@NSF_COMPATIBLE_TCLSH@
#!/bin/env tclsh
puts @NSF_COMPATIBLE_TCLSH@
#
# 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.
#
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
}
Jump to Line
Something went wrong with that request. Please try again.