Index: README ================================================================== --- README +++ README @@ -1,8 +1,8 @@ FILE: "/home/joze/src/tclreadline/README" - LAST MODIFICATION: "Tue Aug 31 03:31:39 1999 (joze)" + LAST MODIFICATION: "Thu Sep 16 20:02:57 1999 (joze)" (C) 1998, 1999 by Johannes Zellner, $Id$ --- tclreadline -- gnu readline for tcl @@ -74,10 +74,23 @@ does the rest. 4. History and Changes. ----------------------- + + +tclreadline-0.9.3: (Sep 1999) + + changes: + - tk completion. + - multiple fallback completion routines for unknown + commands. + - readline reset-terminal sub-function. + + fixes: + - another revision of procession events and macros. + tclreadline-0.9.2: (Aug 1999) changes: - history event `!' expansion on Index: tclreadlineCompleter.tcl ================================================================== --- tclreadlineCompleter.tcl +++ tclreadlineCompleter.tcl @@ -1,8 +1,8 @@ # -*- tclsh -*- -# FILE: "/disk01/home/joze/src/tclreadline/tclreadlineCompleter.tcl" -# LAST MODIFICATION: "Thu Sep 16 16:24:46 1999 (joze)" +# FILE: "/home/joze/src/tclreadline/tclreadlineCompleter.tcl" +# LAST MODIFICATION: "Thu Sep 16 22:17:38 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -1007,10 +1007,13 @@ regsub -all {^::} $alias {} alias set namespc [namespace qualifiers $alias] set alias [namespace tail $alias] } + # try first a specific completer, then, and only then + # the tclreadline_complete_unknown. + # foreach cmd [list ${alias} tclreadline_complete_unknown] { # puts stderr ${namespc}complete(${cmd}) if {"" != [namespace eval ::tclreadline::${namespc} \ [list info procs complete(${cmd})]] } { @@ -1037,13 +1040,21 @@ ::tclreadline::errorMsg] } { error [list error during evaluation of `complete(${cmd})'] } # puts stderr \nscript_result=|${script_result}| - if {[string length ${script_result}] || \ + if {![string length ${script_result}] && \ "tclreadline_complete_unknown" == ${cmd} } { + # as we're here, the tclreadline_complete_unknown + # returned an empty string. Fall thru and try + # further fallback completers. + # + } else { + # return also empty strings, if + # they're from a specific completer. + # return ${script_result} } } # set namespc ""; # no qualifiers for tclreadline_complete_unknown } @@ -3014,11 +3025,11 @@ return "" } proc complete(time) {text start end line pos mod} { switch -- $pos { - 1 { return [DisplayHints