Check-in [9e7c008b8c]
Not logged in
Overview
Comment: small fix in the completer so that it completes options (public variables) for itcl.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9e7c008b8ca543033e7c47da702436aa184fc7e1
User & Date: johannes@zellner.org on 2000-07-01 14:23:17
Other Links: manifest | tags
Context
2000-07-01
22:18
1. usable version after change to automake check-in: 30437b03ab user: johannes@zellner.org tags: trunk
14:23
small fix in the completer so that it completes options (public variables) for itcl. check-in: 9e7c008b8c user: johannes@zellner.org tags: trunk
2000-03-25
20:59
Sat Mar 25 21:58:26 CET 2000 check-in: 407e6d1b0a user: johannes@zellner.org tags: trunk
Changes

Modified configure.in from [3dc2bfd8b1] to [177d3bdd31].

1
2
3
4
5
6
7
8
9
10
dnl -*- autoconf -*-
dnl FILE: "/home/joze/src/tclreadline/configure.in"
dnl LAST MODIFICATION: "Sat, 25 Mar 2000 21:17:25 +0100 (joze)"
dnl (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
dnl $Id$
dnl ---
dnl
dnl tclreadline -- gnu readline for tcl
dnl http://www.zellner.org/tclreadline/
dnl Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>


|







1
2
3
4
5
6
7
8
9
10
dnl -*- autoconf -*-
dnl FILE: "/home/joze/src/tclreadline/configure.in"
dnl LAST MODIFICATION: "Sat, 01 Jul 2000 16:19:57 +0200 (joze)"
dnl (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
dnl $Id$
dnl ---
dnl
dnl tclreadline -- gnu readline for tcl
dnl http://www.zellner.org/tclreadline/
dnl Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
AC_CONFIG_HEADER(config.h)
AC_PREREQ(2.13)
AC_REVISION($Revision$)
AC_CONFIG_AUX_DIR(./aux)

TCLREADLINE_MAJOR_VERSION=1
TCLREADLINE_MINOR_VERSION=2
TCLREADLINE_PATCHLEVEL=0
TCLREADLINE_VERSION=$TCLREADLINE_MAJOR_VERSION.$TCLREADLINE_MINOR_VERSION
TCLREADLINE_PATCHLEVEL_STR=${TCLREADLINE_VERSION}.${TCLREADLINE_PATCHLEVEL}
VERSION=$TCLREADLINE_VERSION

dnl AM_INIT_AUTOMAKE(tclreadline, $VERSION)

AC_CANONICAL_HOST







|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
AC_CONFIG_HEADER(config.h)
AC_PREREQ(2.13)
AC_REVISION($Revision$)
AC_CONFIG_AUX_DIR(./aux)

TCLREADLINE_MAJOR_VERSION=1
TCLREADLINE_MINOR_VERSION=2
TCLREADLINE_PATCHLEVEL=1
TCLREADLINE_VERSION=$TCLREADLINE_MAJOR_VERSION.$TCLREADLINE_MINOR_VERSION
TCLREADLINE_PATCHLEVEL_STR=${TCLREADLINE_VERSION}.${TCLREADLINE_PATCHLEVEL}
VERSION=$TCLREADLINE_VERSION

dnl AM_INIT_AUTOMAKE(tclreadline, $VERSION)

AC_CANONICAL_HOST

Modified tclreadlineCompleter.tcl from [a07d7cee03] to [e34a842808].

1
2
3
4
5
6
7
8
9
10
# -*- tclsh -*-
# FILE: "/home/joze/src/tclreadline/tclreadlineCompleter.tcl"
# LAST MODIFICATION: "Sat, 25 Mar 2000 21:28:45 +0100 (joze)"
# (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# vim:set ts=4:
# ---
#
# tclreadline -- gnu readline for tcl
# http://www.zellner.org/tclreadline/


|







1
2
3
4
5
6
7
8
9
10
# -*- tclsh -*-
# FILE: "/home/joze/src/tclreadline/tclreadlineCompleter.tcl"
# LAST MODIFICATION: "Sat, 01 Jul 2000 16:15:55 +0200 (joze)"
# (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# vim:set ts=4:
# ---
#
# tclreadline -- gnu readline for tcl
# http://www.zellner.org/tclreadline/
490
491
492
493
494
495
496

497
498

499
500






501
502
503
504
505
506
507
508
509
510
	# We always use `configure' here,
	# because cget will not return the
	# option table.
	#
	if {[catch [list set option_table [eval ${cmd} configure]] msg]} {
		return 0
	}

	foreach optline ${option_table} {
		if {5 != [llength ${optline}]} continue else {

			lappend options(switches) [lindex ${optline} 0]
			lappend options(value)    [lindex ${optline} 4]






		}
	}
	return [llength ${option_table}]
}

#**
# try to complete a `cmd configure|cget ..' from the command's options.
# @param   text start line cmd, standard tclreadlineCompleter arguments.
# @return  -- a flag indicating, if (cget|configure) was found.
# @return  resultT -- a tclreadline completer formatted string.







>

|
>


>
>
>
>
>
>


|







490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
	# We always use `configure' here,
	# because cget will not return the
	# option table.
	#
	if {[catch [list set option_table [eval ${cmd} configure]] msg]} {
		return 0
	}
	set retval 0
	foreach optline ${option_table} {
		if {5 == [llength ${optline}]} {
			# tk returns a list of length 5
			lappend options(switches) [lindex ${optline} 0]
			lappend options(value)    [lindex ${optline} 4]
			incr retval
		} elseif {3 == [llength ${optline}]} {
			# itcl returns a list of length 3
			lappend options(switches) [lindex ${optline} 0]
			lappend options(value)    [lindex ${optline} 2]
			incr retval
		}
	}
	return $retval
}

#**
# try to complete a `cmd configure|cget ..' from the command's options.
# @param   text start line cmd, standard tclreadlineCompleter arguments.
# @return  -- a flag indicating, if (cget|configure) was found.
# @return  resultT -- a tclreadline completer formatted string.