Diff
Not logged in

Differences From Artifact [d9f3f38a64]:

To Artifact [561d62d80a]:


69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
to modify your .tclshrc according to the section \fBFILES\fP.

For the functionality of the GNU readline you should refer to
the readline's documentation.

.PP
The following list will give all commands, which are currently
implemented in the shared lib (e.g. libtclreadline@TCLREADLINE_VERSION@.so).
Additional commands were introduced in a startup script
\fBtclreadlineSetup.tcl\fP, which lives in the tclreadline
installation directory.
(typically something like /usr/local/lib/tclreadline ..)
These commands are primarily for internal use and not documented here.

Note that all commands reside in the namespace \fB::tclreadline::\fP.







|







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
to modify your .tclshrc according to the section \fBFILES\fP.

For the functionality of the GNU readline you should refer to
the readline's documentation.

.PP
The following list will give all commands, which are currently
implemented in the shared lib (e.g. libtclreadline@VERSION@.so).
Additional commands were introduced in a startup script
\fBtclreadlineSetup.tcl\fP, which lives in the tclreadline
installation directory.
(typically something like /usr/local/lib/tclreadline ..)
These commands are primarily for internal use and not documented here.

Note that all commands reside in the namespace \fB::tclreadline::\fP.
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
of the line). The default for this script is "puts {}; exit". Setting
this to an empty value disables any action on eof.
\fBtclreadline::readline eof\fP returns the current eof script.

.TP 5
\fB::tclreadline::readline initialize\fP \fIhistoryfile\fP
initialize the tclreadline interface and read the history from
the \fIhistoryfile\fP. On succes an empty string is returned.
This command has to be called before any other tclreadline commands.

.TP 5
\fB::tclreadline::readline read\fP \fIprompt\fP
prints the \fIprompt\fP to stdout and enters the tclreadline event
loop. Both readline and X events are processed. Returns the
(eventually history-expanded) input string.







|







141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
of the line). The default for this script is "puts {}; exit". Setting
this to an empty value disables any action on eof.
\fBtclreadline::readline eof\fP returns the current eof script.

.TP 5
\fB::tclreadline::readline initialize\fP \fIhistoryfile\fP
initialize the tclreadline interface and read the history from
the \fIhistoryfile\fP. On success an empty string is returned.
This command has to be called before any other tclreadline commands.

.TP 5
\fB::tclreadline::readline read\fP \fIprompt\fP
prints the \fIprompt\fP to stdout and enters the tclreadline event
loop. Both readline and X events are processed. Returns the
(eventually history-expanded) input string.
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
it is probably a good idea to start with tclreadline::Loop
(see the file tclreadlineSetup.tcl).

.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:
.CS
    package require tclreadline
    namespace eval tclreadline {
        proc prompt1 {} {
            return "[clock format [clock seconds]]> "
        }
    }
    ::tclreadline::Loop
.CE

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"

\fItclreadline\fP defines the following variables in the
namespace \fI::tclreadline\fP:
(for backwards compatiblity the global variables tclreadline_version,
 tclreadline_patchLevel and tclreadline_library are still present).

.TP 5
\fBtclreadline::version\fP (read-only)
holds the version string "@TCLREADLINE_VERSION@".

.TP 5
\fBtclreadline::patchLevel\fP (read-only)
holds the patch level string "@PATCHLEVEL_STR@".

.TP 5
\fBtclreadline::library\fP (read-only)
holds the library string "@TCLREADLINE_LIBRARY@".

.TP 5
\fBtclreadline::license\fP (read-only)
holds a BSD license statement.

.TP 5
\fBtclreadline::historyLength\fP







|




















>
>
>
>
>










|




|







|







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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
it is probably a good idea to start with tclreadline::Loop
(see the file tclreadlineSetup.tcl).

.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:
.CS
    package require tclreadline
    namespace eval tclreadline {
        proc prompt1 {} {
            return "[clock format [clock seconds]]> "
        }
    }
    ::tclreadline::Loop
.CE

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.

.TP 5
\fB::tclreadline::prompt2\fP
a proc which is called by ::tclreadline::Loop and returns a string
which will be displayed as the secondary prompt when interactively
prompting  for  continuation  of  an incomplete command.

.\" .SH "EXAMPLES"


.\" .SH "ENVIRONMENT VARIABLES"

.SH "VARIABLES"

\fItclreadline\fP defines the following variables in the
namespace \fI::tclreadline\fP:
(for backwards compatibility the global variables tclreadline_version,
 tclreadline_patchLevel and tclreadline_library are still present).

.TP 5
\fBtclreadline::version\fP (read-only)
holds the version string "@VERSION@".

.TP 5
\fBtclreadline::patchLevel\fP (read-only)
holds the patch level string "@PATCHLEVEL_STR@".

.TP 5
\fBtclreadline::library\fP (read-only)
holds the library string "@TCLRL_DIR@".

.TP 5
\fBtclreadline::license\fP (read-only)
holds a BSD license statement.

.TP 5
\fBtclreadline::historyLength\fP