Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -1,8 +1,8 @@ # -*- autoconf -*- # FILE: "/diska/home/joze/src/tclreadline/configure.in" -# LAST MODIFICATION: "Mon Aug 30 11:04:20 1999 (joze)" +# LAST MODIFICATION: "Mon Sep 6 11:30:15 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -35,11 +35,11 @@ AC_INIT(tclreadline.c) TCLREADLINE_MAJOR_VERSION=0 TCLREADLINE_MINOR_VERSION=9 -TCLREADLINE_PATCHLEVEL=2 +TCLREADLINE_PATCHLEVEL=3 TCLREADLINE_VERSION=$TCLREADLINE_MAJOR_VERSION.$TCLREADLINE_MINOR_VERSION TCLREADLINE_PATCHLEVEL_STR=${TCLREADLINE_VERSION}.${TCLREADLINE_PATCHLEVEL} VERSION=$TCLREADLINE_VERSION Index: tclreadlineSetup.tcl.in ================================================================== --- tclreadlineSetup.tcl.in +++ tclreadlineSetup.tcl.in @@ -1,8 +1,8 @@ #!/usr/locanl/bin/tclsh # FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in" -# LAST MODIFICATION: "Mon Sep 6 08:50:52 1999 (joze)" +# LAST MODIFICATION: "Mon Sep 6 11:21:53 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -1021,11 +1021,10 @@ foreach line { "after option ?arg arg ...?" "append varName ?value value ...?" "array option arrayName ?arg ...?" "bgerror" - "binary option ?arg arg ...?" "break" "catch command ?varName?" "cd" "clock" "close " @@ -1135,14 +1134,14 @@ # ------------------------------------- # TCL # ------------------------------------- proc complete(append) {text start end line pos mod} { - if {1 == $pos} { - return [VarCompletion ${text}] + switch -- $pos { + 1 { return [VarCompletion ${text}] } + default { return [Menu ?value?] } } - return "" } proc complete(if) {text start end line pos mod} { # TODO: this is not good yet. if {2 == $pos} { @@ -1227,25 +1226,34 @@ } return "" } proc complete(binary) {text start end line pos mod} { - if {1 == $pos} { - set cmds { - format scan - } - return [AttemptFromList $text $cmds] -# -# } elseif {2 == $pos} { -# set cmd [lindex $line 1] -# switch -- $cmd { -# format - -# scan - -# } -# - } - return "" + set cmd [lindex $line 1] + switch -- $pos { + 1 { + return [AttemptFromList $text {format scan}] + } + 2 { + switch -- $cmd { + format - { return [Menu formatString] } + scan - { return [Menu string] } + } + } + 3 { + switch -- $cmd { + format - { return [Menu ?arg?] } + scan - { return [Menu formatString] } + } + } + default { + switch -- $cmd { + format - { return [Menu ?arg?] } + scan - { return [Menu ?varName?] } + } + } + } } proc complete(clock) {text start end line pos mod} { if {1 == $pos} { set cmds {clicks format scan seconds}