Check-in [d6ac1c38a3]
Not logged in
Overview
Comment: share/vim/ft/c_ft.vim share/vim/ft/cpp_ft.vim src/tclreadline/configure.in src/tclreadline/tclreadline.n.in src/tclreadline/tclreadlineSetup.tcl.in Added Files: src/tclreadline/Makefile.in src/tclreadline/tclreadline.c src/tclreadline/tclreadlineConfig.sh.in src/tclreadline/tclreadlineInit.tcl.in
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d6ac1c38a333bad6fc6a81bda547805a26b82931
User & Date: johannes@zellner.org on 1999-08-20 22:43:28
Other Links: manifest | tags
Context
1999-08-21
16:16
Modified Files: share/vim/VIM/vimrc share/vim/functions/selectBuffer.vim Added Files: src/tclreadline/Makefile.in src/tclreadline/tclreadline.c src/tclreadline/tclreadlineConfig.sh.in src/tclreadline/tclreadlineInit.tcl.in check-in: 1d9d3e3f9c user: johannes@zellner.org tags: trunk
1999-08-20
22:43
share/vim/ft/c_ft.vim share/vim/ft/cpp_ft.vim src/tclreadline/configure.in src/tclreadline/tclreadline.n.in src/tclreadline/tclreadlineSetup.tcl.in Added Files: src/tclreadline/Makefile.in src/tclreadline/tclreadline.c src/tclreadline/tclreadlineConfig.sh.in src/tclreadline/tclreadlineInit.tcl.in check-in: d6ac1c38a3 user: johannes@zellner.org tags: trunk
16:55
.tclshrc pkgMkIndex vimrc Makefile.in tclreadline.c check-in: 199260e23f user: johannes@zellner.org tags: trunk
Changes

Modified Makefile.in from [b22049b06e] to [52fb3dea44].

1
2
3


4
5
6
7
8
9
10
1


2
3
4
5
6
7
8
9
10

-
-
+
+







# -*- make -*-
# FILE: "/diska/home/joze/src/tclreadline/Makefile.in"
# LAST MODIFICATION: "Fri Aug 20 17:22:45 1999 (joze)"
# FILE: "/home/joze/src/tclreadline/Makefile.in"
# LAST MODIFICATION: "Sat Aug 21 00:21:27 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
176
177
178
179
180
181
182

183
184
185
186
187
188
189
190

191
192
193
194
195
196
197
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

191
192
193
194
195
196
197
198







+







-
+







    aux/config.guess \
    aux/config.sub \
    aux/install-sh \
    aux/mkinstalldirs \
    aux/vimtags

MAN = tclreadline.n
HTML = tclreadline.n.html

CIFLAGS = -f -t-"gnu readline for tcl" -m"before initial relase"

.PHONY: clean distclean ctags tcltags vimtags tags ci co

.SUFFIXES: .c .o .so .sl .tcl

all: $(TCLREADLINE_LIB_FILE) pkgIndex.tcl
all: $(TCLREADLINE_LIB_FILE)


@TCLREADLINE_LIB_FILE@: ${OBJS}
	rm -f $(TCLREADLINE_LIB_FILE)
	@MAKE_LIB@ $(TERMCAP_LIB) $(READLINE_LIB)
	$(RANLIB) $(TCLREADLINE_LIB_FILE)

216
217
218
219
220
221
222
223
224


225
226
227
228
229
230
231
217
218
219
220
221
222
223


224
225
226
227
228
229
230
231
232







-
-
+
+







	$(INSTALL_DATA) tclreadlineConfig.sh $(LIBRARY_INSTALL_DIR)

FORCE:

$(MANN_INSTALL_DIR)/$(MAN): FORCE
	- $(INSTALL_DATA) $(srcdir)/$(MAN) $@ &&  chmod 644 $@

pkgIndex.tcl:
	@echo "eval pkg_mkIndex $(TOP_DIR) tclreadline*.tcl" | tclsh
tclreadline.n.html: tclreadline.n
	rman -f html $^ > $@

Makefile: $(TOP_DIR)/Makefile.in
	$(SHELL) config.status

clean:
	rm -f *.a *.o core errs *~ \#* tags* *.E a.out errors so_locations

262
263
264
265
266
267
268
269

270
271

272
273
274
275
276
263
264
265
266
267
268
269

270
271

272
273
274
275
276
277







-
+

-
+






ci: $(SOURCES)
	ci -u $(CIFLAGS) $^

co: $(SOURCES)
	co -l $^

distribution: $(SOURCES) configure $(AUXILIARY)
distribution: $(SOURCES) configure $(AUXILIARY) tclreadline.n.html
	- mkdir -p dist/tclreadline-$(VERSION)/aux
	- cp $(SOURCES) configure dist/tclreadline-$(VERSION)
	- cp $(SOURCES) configure tclreadline.n.html dist/tclreadline-$(VERSION)
	- cp $(AUXILIARY) dist/tclreadline-$(VERSION)/aux
	(cd dist; tar zcvf tclreadline-$(VERSION).tar.gz tclreadline-$(VERSION); rm -rf tclreadline-$(VERSION))


# DO NOT DELETE THIS LINE -- make depend depends on it.

Modified configure.in from [8b6b93a489] to [5469ed1d1f].

1
2
3


4
5
6
7
8
9
10
1


2
3
4
5
6
7
8
9
10

-
-
+
+







# -*- autoconf -*-
# FILE: "/diska/home/joze/src/tclreadline/configure.in"
# LAST MODIFICATION: "Fri Aug 20 15:52:19 1999 (joze)"
# FILE: "/home/joze/src/tclreadline/configure.in"
# LAST MODIFICATION: "Fri Aug 20 23:57:02 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
108
109
110
111
112
113
114

115
116
117
118
119
120
121
122
123
124
125
126

127
128
129
130
131
132
133
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

127
128
129
130
131
132
133
134







+











-
+










# -----------------------------------------------------------------------
#   Set up a new default --prefix.
# -----------------------------------------------------------------------

# this is the default anyway:
# AC_PREFIX_DEFAULT(/usr/local)

if test "${prefix}" = "NONE"; then
    prefix=$TCL_PREFIX
fi
if test "${exec_prefix}" = "NONE"; then
    exec_prefix=$TCL_EXEC_PREFIX
else
    TCLREADLINE_PACKAGE_PATH=${exec_prefix}/lib
fi

TCLREADLINE_LIBRARY=$TCLREADLINE_PACKAGE_PATH/tclreadline$TCLREADLINE_VERSION
TCLREADLINE_LIBRARY=${exec_prefix}/lib/tclreadline$TCLREADLINE_VERSION


# -----------------------------------------------------------------------
#   Check for some programs here.
# -----------------------------------------------------------------------

AC_PROG_INSTALL

Modified tclreadline.c from [4a41886173] to [1a4acfc94a].

1
2
3
4
5


6
7
8
9
10
11
12
1
2
3


4
5
6
7
8
9
10
11
12



-
-
+
+








 /* ==================================================================

    FILE: "/diska/home/joze/src/tclreadline/tclreadline.c"
    LAST MODIFICATION: "Fri Aug 20 18:14:57 1999 (joze)"
    FILE: "/home/joze/src/tclreadline/tclreadline.c"
    LAST MODIFICATION: "Fri Aug 20 23:41:24 1999 (joze)"
    (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    ---

    tclreadline -- gnu readline for tcl
    Copyright (C) 1999  Johannes Zellner

212
213
214
215
216
217
218
219

220
221
222
223
224
225
226
212
213
214
215
216
217
218

219
220
221
222
223
224
225
226







-
+







	    (char *) NULL);
    return TCL_ERROR;

}

void TclReadlineDataAvailableHandler (ClientData clientData, int mask)
{
#if 1
#if 0
    fprintf (stderr, "(TclReadlineDataAvailableHandler) mask = %d\n",  mask);
#endif
    if (mask & TCL_READABLE) {
        rl_callback_read_char ();
        rl_redisplay ();
    }
}

Modified tclreadline.n.in from [09c544295b] to [7b31b0a3f2].

1
2
3
4
5


6
7
8
9
10
11
12
1
2
3


4
5
6
7
8
9
10
11
12



-
-
+
+







.TH tclreadline n "@TCLREADLINE_VERSION@" "Johannes Zellner"

.\" (C) 1999 by Johannes Zellner
.\" FILE: "/diska/home/joze/src/tclreadline/tclreadline.n.in"
.\" LAST MODIFICATION: "Fri Aug 20 15:01:22 1999 (joze)"
.\" FILE: "/home/joze/src/tclreadline/tclreadline.n.in"
.\" LAST MODIFICATION: "Sat Aug 21 00:33:01 1999 (joze)"
.\" (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
.\" $Id$
.\" ---
.\"
.\" tclreadline -- gnu readline for the tcl scripting language
.\" Copyright (C) 1999  Johannes Zellner
.\"
127
128
129
130
131
132
133

























134
135
136
137
138
139
140
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







arguments, it just returns the current setting.

.TP 5
\fB::tclreadline::Loop\fP
enter the tclreadline main loop. This command is typically called from
the startup resource file (something .tclshrc, depending on the interpreter
you use). \fB::tclreadline::Loop\fP will normally not return.

.TP 5
\fB::tclreadline::prompt1\fP
a proc which is called by ::tclreadline::Loop and returns a string
which will be displayed as the primary prompt. This prompt will be
something like "[info nameofexecutable] \[[pwd]\]" possibly fancy colored.
The default proc is defined on entering the ::tclreadline::Loop,
if it is not already defined. So: If you define your own proc
::tclreadline::prompt1 before entering ::tclreadline::Loop, this
proc is called each time the prompt is to be displayed.
Example:
.EQ
    package require tclreadline
    namespace eval tclreadline {
        proc prompt1 {} {
            return "[clock format [clock seconds]]> "
        }
    }
    ::tclreadline::Loop
.EN
Note that non-printable control characters as color control characters
must be enclosed in literal ctrl-a / ctrl-b to tell readline the length
of the printable prompt. See for example the variable `prompt_string'
in the file tclreadlineSetup.tcl in your tclreadline installation directory.


.\".SH "EXAMPLES"


.\".SH "ENVIRONMENT VARIABLES"

.SH VARIABLES
171
172
173
174
175
176
177
178

179
180
181
182
183
184
185
186
187
188

189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208


209
210
211
212
213
214
215
216
217
218
219
220
196
197
198
199
200
201
202

203
204
205
206
207
208
209
210
211
212

213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232

233
234
235
236
237
238
239
240
241
242
243
244
245
246







-
+









-
+



















-
+
+












The `global' readline settings there will be valid also for
\fBtclreadline\fP. Additionally the .inputrc might hold conditional
settings for the implementation name \fBtclreadline\fP. Example of 
some lines in your .inputrc:

.EQ
    $if tclreadline
    "\C-xp": "puts $env(PATH)"
    "\\C-xp": "puts $env(PATH)"
    $endif
.EN

For further documentation please refer to the gnu readline documentation.

.SH BUGS
probably.


.SH "SEE ALSO"
.SH SEE ALSO


.PP
The official \fBtclreadline\fP web site at:

.PP
.RS 4
http://www.zellner.org/tclreadline/
.RE


.SH AUTHOR
Johannes Zellner, <johannes@zellner.org>
.br
.SH CONTRIBUTIONS, SUGGESTIONS AND PATCHES
Magnus Eriksson <magnus.eriksson@netinsight.se>,
Les Johnson <les@infolabs.com>,
Harald Kirsch <kir@iitb.fhg.de>,
Christian Krone <krischan@sql.de>,
Larry W. Virden <lvirden@cas.org>
Larry W. Virden <lvirden@cas.org>,
David Engel <dlengel@home.com>, <david@debian.org>

.SH DEBIAN PACKAGE
David Engel <dlengel@home.com>, <david@debian.org>

.SH HISTORY
This version of \fBtclreadline\fP is still a development version.
Pretty a lot of features and ideas are not implemented yet. The
reason for this is the lack of time and manpower.
So you are welcome to modify and contribute to the code.
If you have suggestions, please let me know.


Modified tclreadlineSetup.tcl.in from [5442833e91] to [8545e21571].

1
2
3


4
5
6
7
8
9
10
1


2
3
4
5
6
7
8
9
10

-
-
+
+







#!/usr/local/bin/tclsh
# FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Fri Aug 20 15:23:15 1999 (joze)"
# FILE: "/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Sat Aug 21 00:19:39 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
42
43
44
45
46
47
48
49

50
51

52
53

54
55
56
57
58
59
60
42
43
44
45
46
47
48

49
50

51
52

53
54
55
56
57
58
59
60







-
+

-
+

-
+







    set savedErrorInfo $errorInfo
    set name [lindex $args 0]
    if ![info exists auto_noload] {
        #
        # Make sure we're not trying to load the same proc twice.
        #
        if [info exists unknown_pending($name)] {
            return -code error "self-referential recursion in \"unknown\" for command \"$name\"";
            return -code error "self-referential recursion in \"unknown\" for command \"$name\""
        }
        set unknown_pending($name) pending;
        set unknown_pending($name) pending
        set ret [catch {auto_load $name [uplevel 1 {namespace current}]} msg]
        unset unknown_pending($name);
        unset unknown_pending($name)
        if {$ret != 0} {
            return -code $ret -errorcode $errorCode \
                "error while autoloading \"$name\": $msg"
        }
        if ![array size unknown_pending] {
            unset unknown_pending
        }
162
163
164
165
166
167
168

169
170
171
172
173
174






175
176
177
178
179





180
181
182
183
184
185
186
162
163
164
165
166
167
168
169






170
171
172
173
174
175
176




177
178
179
180
181
182
183
184
185
186
187
188







+
-
-
-
-
-
-
+
+
+
+
+
+

-
-
-
-
+
+
+
+
+







                    set prompt_string "\[0;94m$base$tk_version\[0m"
                } else {
                    set prompt_string "\[0;91m$base\[0m"
                }

            }

            if {"" == [info procs ::tclreadline::prompt1]} {
            proc ::tclreadline::prompt1 {} {
                variable prompt_string
                global env
                if {[catch {set pwd [pwd]} tmp]} {
                    set pwd "unable to get pwd"
                }
                proc ::tclreadline::prompt1 {} {
                    variable prompt_string
                    global env
                    if {[catch {set pwd [pwd]} tmp]} {
                        set pwd "unable to get pwd"
                    }

                if [info exists env(HOME)] {
                    regsub $env(HOME) $pwd "~" pwd
                }
                return "$prompt_string \[$pwd\]"
                    if [info exists env(HOME)] {
                        regsub $env(HOME) $pwd "~" pwd
                    }
                    return "$prompt_string \[$pwd\]"
                }
            }
        }

        proc ls {args} {
            if {[exec uname -s] == "Linux"} {
                eval exec ls --color -FC [::tclreadline::Glob $args]
            } else {
289
290
291
292
293
294
295
296

297
298
299
300
301
302
303
291
292
293
294
295
296
297

298
299
300
301
302
303
304
305







-
+







                set ::tclreadline::LINE [::tclreadline::readline read \
                    [::tclreadline::prompt1]]
            } else {
                set ::tclreadline::LINE [::tclreadline::readline read %]
            }

            while {![::tclreadline::readline complete $::tclreadline::LINE]} {
                append ::tclreadline::LINE ";"
                append ::tclreadline::LINE "\n"
                append ::tclreadline::LINE [::tclreadline::readline read \
                    ${::tclreadline::prompt2}]
            }

            # Magnus Eriksson <magnus.eriksson@netinsight.se> proposed
            history add $::tclreadline::LINE