1
2
3
4
5
6
7
8
9
10
|
#!/usr/local/bin/tclsh
# FILE: "/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Wed Aug 25 02:00:47 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/local/bin/tclsh
# FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Wed Aug 25 11:12:19 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999 Johannes Zellner
#
|
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
# puts stderr "(SubCmd) $new_start $new_end $new_line"
return \
[tclreadline::ScriptCompleter $part $new_start $new_end $new_line]
} elseif {0 == [set pos [tclreadline::PartPosition $part $start $end $line]]} {
# puts stderr "(PartPosition) $part $start $end $line"
# set matches [array names known_cmds "[string trim ${part}]*"]
set cmd "[string trim ${part}]*"
set matches "[info commands $cmd] [info proc $cmd]"
# puts matches=|$matches|
if {1 == [llength $matches]} { ; # unique match
return $matches
} elseif {"" != $matches} {
set common [tclreadline::GetCommon ${matches}]
# puts stderr common=|$common|
if {"" == $common} {
|
|
|
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
# puts stderr "(SubCmd) $new_start $new_end $new_line"
return \
[tclreadline::ScriptCompleter $part $new_start $new_end $new_line]
} elseif {0 == [set pos [tclreadline::PartPosition $part $start $end $line]]} {
# puts stderr "(PartPosition) $part $start $end $line"
# set matches [array names known_cmds "[string trim ${part}]*"]
set cmd "[string trim ${part}]*"
set matches [string trim "[info commands $cmd] [info proc $cmd]"]
# puts matches=|$matches|
if {1 == [llength $matches]} { ; # unique match
return $matches
} elseif {"" != $matches} {
set common [tclreadline::GetCommon ${matches}]
# puts stderr common=|$common|
if {"" == $common} {
|