1
2
3
4
5
6
7
8
9
10
|
#!/usr/locanl/bin/tclsh
# FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Wed Sep 8 18:09:57 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999 Johannes Zellner
#
|
|
|
|
1
2
3
4
5
6
7
8
9
10
|
#!/usr/locanl/bin/tclsh
# FILE: "/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Mon Sep 13 23:44:55 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999 Johannes Zellner
#
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#
# johannes@zellner.org
# http://www.zellner.org/tclreadline/
#
# ==================================================================
package provide tclreadline @TCLREADLINE_VERSION@
proc unknown args {
global auto_noexec auto_noload env unknown_pending tcl_interactive
global errorCode errorInfo
# Save the values of errorCode and errorInfo variables, since they
|
|
>
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#
# johannes@zellner.org
# http://www.zellner.org/tclreadline/
#
# ==================================================================
# package provide tclreadline @TCLREADLINE_VERSION@
package provide tclreadline 0.9
proc unknown args {
global auto_noexec auto_noload env unknown_pending tcl_interactive
global errorCode errorInfo
# Save the values of errorCode and errorInfo variables, since they
|
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
|
} ::tclreadline::errorMsg]} {
puts stderr [list tclreadline::Loop: error. \
$::tclreadline::errorMsg]
continue
}
# Magnus Eriksson <magnus.eriksson@netinsight.se> proposed
history add $LINE
if [catch {
set result [eval $LINE]
if {$result != "" && [tclreadline::Print]} {
puts $result
}
set result ""
|
>
>
>
>
>
>
>
>
|
>
|
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
|
} ::tclreadline::errorMsg]} {
puts stderr [list tclreadline::Loop: error. \
$::tclreadline::errorMsg]
continue
}
# Magnus Eriksson <magnus.eriksson@netinsight.se> proposed
# to add the line also to tclsh's history.
#
# I decided to add only lines which are different from
# the previous one to the history. This is different
# from tcsh's behaviour, but I found it quite convenient
# while using mshell on os9.
#
if {[string length $LINE] && [history event 0] != $LINE} {
history add $LINE
}
if [catch {
set result [eval $LINE]
if {$result != "" && [tclreadline::Print]} {
puts $result
}
set result ""
|