Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -1,8 +1,8 @@ # -*- autoconf -*- # FILE: "/home/joze/src/tclreadline/configure.in" -# LAST MODIFICATION: "Mon Sep 27 00:09:59 1999 (joze)" +# LAST MODIFICATION: "Tue Sep 28 22:51:45 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -36,11 +36,11 @@ AC_INIT(tclreadline.c) AC_CONFIG_HEADER(config.h) TCLREADLINE_MAJOR_VERSION=1 TCLREADLINE_MINOR_VERSION=0 -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: tclreadlineCompleter.tcl ================================================================== --- tclreadlineCompleter.tcl +++ tclreadlineCompleter.tcl @@ -1,8 +1,8 @@ # -*- tclsh -*- # FILE: "/home/joze/src/tclreadline/tclreadlineCompleter.tcl" -# LAST MODIFICATION: "Mon Sep 27 00:09:06 1999 (joze)" +# LAST MODIFICATION: "Tue Sep 28 23:04:09 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -3519,10 +3519,52 @@ # --- END OF TCLREADLINE PACKAGE --- proc complete(tell) {text start end line pos mod} { switch -- ${pos} { 1 { return [ChannelId ${text}] } + } + return "" +} + +proc complete(testthread) {text start end line pos mod} { + + set cmd [Lindex ${line} 1] + switch -- ${pos} { + 1 { + return [CompleteFromList ${text} { + -async create errorproc exit id names send wait + }] + } + 2 { + switch -- [PreviousWord ${start} ${line}] { + create { + return [BraceOrCommand \ + ${text} ${start} ${end} ${line} ${pos} ${mod}] + } + -async { + return [CompleteFromList ${text} send] + } + send { + return [CompleteFromList ${text} [testthread names]] + } + default {} + } + } + 3 { + if {"send" == [PreviousWord ${start} ${line}]} { + return [CompleteFromList ${text} [testthread names]] + } elseif {"send" == ${cmd}} { + return [BraceOrCommand \ + ${text} ${start} ${end} ${line} ${pos} ${mod}] + } + } + 4 { + if {"send" == [Lindex ${line} 2]} { + return [BraceOrCommand \ + ${text} ${start} ${end} ${line} ${pos} ${mod}] + } + } } return "" } proc complete(time) {text start end line pos mod} {