1
2
3
4
5
6
7
8
9
10
|
# -*- tclsh -*-
# FILE: "/home/joze/src/tclreadline/tclreadlineCompleter.tcl"
# LAST MODIFICATION: "Sun Sep 19 22:09:08 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
|
# -*- tclsh -*-
# FILE: "/home/joze/src/tclreadline/tclreadlineCompleter.tcl"
# LAST MODIFICATION: "Tue Sep 21 21:19:07 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999 Johannes Zellner
#
|
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
|
}
}
return [string trim ${new}]
}
proc Alert {} {
puts -nonewline \a
flush stdout
}
#**
# get the longest common completion
# e.g. str == {tcl_version tclreadline_version tclreadline_library}
# --> [CompleteLongest ${str}] == "tcl"
#
|
|
<
|
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
|
}
}
return [string trim ${new}]
}
proc Alert {} {
::tclreadline::readline bell
}
#**
# get the longest common completion
# e.g. str == {tcl_version tclreadline_version tclreadline_library}
# --> [CompleteLongest ${str}] == "tcl"
#
|
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
|
}
}
proc tclreadline::complete(readline) {text start end line pos mod} {
set cmd [Lindex ${line} 1]
switch -- ${pos} {
1 { return [CompleteFromList ${text} {
read initialize write add complete
customcompleter builtincompleter eofchar reset-terminal}]
}
2 {
switch -- ${cmd} {
read {}
initialize {}
write {}
add { return [DisplayHints <completerLine>] }
|
|
|
|
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
|
}
}
proc tclreadline::complete(readline) {text start end line pos mod} {
set cmd [Lindex ${line} 1]
switch -- ${pos} {
1 { return [CompleteFromList ${text} {
read initialize write add complete customcompleter
builtincompleter eofchar reset-terminal bell}]
}
2 {
switch -- ${cmd} {
read {}
initialize {}
write {}
add { return [DisplayHints <completerLine>] }
|