4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
|
}
if {$use_tclreadline} {
proc ::tclreadline::prompt1 {} $prompt
::tclreadline::Loop
} else {
fconfigure stdout -blocking false
puts -nonewline "> "
flush stdout
fileevent stdin readable [list apply {{} {
uplevel #0 {
gets stdin __line__
if {$__line__ eq "" && [eof stdin]} {
exit 0
}
if {[catch $__line__ __result__]} {
puts "\[ERROR\] $::errorInfo"
} else {
if {$__result__ ne ""} {
puts "$__result__"
}
}
}
puts -nonewline "> "
flush stdout
}}]
vwait forever
}
}
"import" {
uplevel #0 [list namespace import ::nano::${namespace}::cli::*]
}
|
|
|
|
|
|
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
|
}
if {$use_tclreadline} {
proc ::tclreadline::prompt1 {} $prompt
::tclreadline::Loop
} else {
fconfigure stdout -blocking false
puts -nonewline [apply [list {} $prompt]]
flush stdout
fileevent stdin readable [list apply {{prompt} {
uplevel #0 {
gets stdin __line__
if {$__line__ eq "" && [eof stdin]} {
exit 0
}
if {[catch $__line__ __result__]} {
puts "\[ERROR\] $::errorInfo"
} else {
if {$__result__ ne ""} {
puts "$__result__"
}
}
}
puts -nonewline [apply [list {} $prompt]]
flush stdout
}} $prompt]
vwait forever
}
}
"import" {
uplevel #0 [list namespace import ::nano::${namespace}::cli::*]
}
|