Check-in [702e7f3410]
Not logged in
Overview
Comment:Thu Sep 30 03:25:19 CEST 1999
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 702e7f3410aed542add89d8971dfee5f75b5489a
User & Date: johannes@zellner.org on 1999-09-30 01:26:16
Other Links: manifest | tags
Context
1999-09-30
16:03
Thu Sep 30 18:03:05 MEST 1999 check-in: 5df4b8fab3 user: johannes@zellner.org tags: trunk
01:26
Thu Sep 30 03:25:19 CEST 1999 check-in: 702e7f3410 user: johannes@zellner.org tags: trunk
1999-09-29
18:24
Wed Sep 29 20:24:01 MEST 1999 check-in: 79656128ef user: johannes@zellner.org tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Modified tclreadlineCompleter.tcl from [dc01fb3b61] to [909728e96f].

     1      1   # -*- tclsh -*-
     2         -# FILE: "/disk01/home/joze/src/tclreadline/tclreadlineCompleter.tcl"
     3         -# LAST MODIFICATION: "Wed Sep 29 18:00:58 1999 (joze)"
            2  +# FILE: "/home/joze/src/tclreadline/tclreadlineCompleter.tcl"
            3  +# LAST MODIFICATION: "Wed Sep 29 21:25:15 1999 (joze)"
     4      4   # (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
     5      5   # $Id$
     6      6   # ---
     7      7   #
     8      8   # tclreadline -- gnu readline for tcl
     9      9   # Copyright (C) 1999  Johannes Zellner
    10     10   #
................................................................................
   246    246   # CompleteFromList will never return an empty string.
   247    247   # completes, if a completion can be done, or ring
   248    248   # the bell if not. If inhibit is non-zero, the result
   249    249   # will be formatted such that readline will not insert
   250    250   # a space after a complete (single) match.
   251    251   #
   252    252   proc CompleteFromList {text lst {allow ""} {inhibit 0}} {
   253         -	set result [TryFromList ${text} ${lst} ${allow} $inhibit]
          253  +	set result [TryFromList ${text} ${lst} ${allow} ${inhibit}]
   254    254   	if {![llength ${result}]} {
   255    255   		Alert
   256    256   		# return [string trim [list ${text}] ${lst}"]
   257    257   		if {[llength ${lst}]} {
   258    258   			return [string trim "${text} ${lst}"]
   259    259   		} else {
   260    260   			return [string trim [list ${text} {}]]
................................................................................
  3587   3587   		2 {
  3588   3588   			return [CompleteFromList ${text} \
  3589   3589   			[uplevel [info level] info vars "${mod}*"]]
  3590   3590   		}
  3591   3591   		3 {
  3592   3592   			switch -- ${cmd} {
  3593   3593   				variable -
  3594         -				vdelete { return [CompleteFromList ${text} {r w u}] }
         3594  +				variable { return [CompleteFromList ${text} {r w u}] }
         3595  +				vdelete {
         3596  +					set var [PreviousWord ${start} ${line}]
         3597  +					set modes ""
         3598  +					foreach info [uplevel [info level] trace vinfo ${var}] {
         3599  +						lappend modes [lindex ${info} 0]
         3600  +					}
         3601  +					return [CompleteFromList ${text} ${modes}]
         3602  +				}
  3595   3603   			}
  3596   3604   		}
  3597   3605   		4 {
  3598   3606   			switch -- ${cmd} {
  3599         -				variable -
  3600         -				vdelete {
         3607  +				variable {
  3601   3608   					return [CompleteFromList ${text} \
  3602   3609   					[CommandCompletion ${text}]]
  3603   3610   				}
         3611  +				vdelete {
         3612  +					set var [Lindex ${line} 2]
         3613  +					set mode [PreviousWord ${start} ${line}]
         3614  +					set scripts ""
         3615  +					foreach info [uplevel [info level] trace vinfo ${var}] {
         3616  +						if {${mode} == [lindex ${info} 0]} {
         3617  +							lappend scripts [list [lindex ${info} 1]]
         3618  +						}
         3619  +					}
         3620  +					return [DisplayHints ${scripts}]
         3621  +				}
  3604   3622   			}
  3605   3623   		}
  3606   3624   	}
  3607   3625   	return ""
  3608   3626   }
  3609   3627   
  3610   3628   proc complete(unknown) {text start end line pos mod} {