Overview
Comment: | Modified Files: tclreadline.n.in Added Files: Makefile.in tclreadline.c tclreadlineConfig.sh.in tclreadlineInit.tcl.in |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
e5343fb8ae1a1171dce9b18cf452291a |
User & Date: | johannes@zellner.org on 1999-08-23 20:38:26 |
Other Links: | manifest | tags |
Context
1999-08-24
| ||
01:23 | Modified Files: tclreadlineSetup.tcl.in Added Files: Makefile.in tclreadline.c tclreadlineConfig.sh.in tclreadlineInit.tcl.in check-in: 1ce074b566 user: johannes@zellner.org tags: trunk | |
1999-08-23
| ||
20:38 | Modified Files: tclreadline.n.in Added Files: Makefile.in tclreadline.c tclreadlineConfig.sh.in tclreadlineInit.tcl.in check-in: e5343fb8ae user: johannes@zellner.org tags: trunk | |
20:04 | Modified Files: configure.in Added Files: Makefile.in tclreadline.c tclreadlineConfig.sh.in tclreadlineInit.tcl.in check-in: bb8a6ef5b9 user: johannes@zellner.org tags: trunk | |
Changes
Modified tclreadline.n.in from [d7922e5c29] to [25cdb5647d].
1 2 3 4 | .TH tclreadline n "@TCLREADLINE_VERSION@" "Johannes Zellner" .\" (C) 1999 by Johannes Zellner .\" FILE: "/home/joze/src/tclreadline/tclreadline.n.in" | | | 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: "/home/joze/src/tclreadline/tclreadline.n.in" .\" LAST MODIFICATION: "Mon Aug 23 22:31:24 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 .\" |
︙ | ︙ | |||
23 24 25 26 27 28 29 | .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\" .\" <johannes@zellner.org>, http://www.zellner.org/tclreadline/ | > > > > > > > > > > > > | < | | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\" .\" <johannes@zellner.org>, http://www.zellner.org/tclreadline/ .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .SH "NAME" tclreadline \- gnu readline for the tcl scripting language .SH "SYNOPSIS" .TP 6 \fB::tclreadline::readline\fP \fIcommand\fP [\fIoptions\fP] .SH "DESCRIPTION" The \fBtclreadline\fP package makes the gnu readline available to the scripting language tcl. The primary purpose of the package is to facilitate the interactive script development by the means of word and file name completion as well as history expansion (well known from shells like bash). |
︙ | ︙ | |||
59 60 61 62 63 64 65 | \fBtclreadline\fP is basically a shared library and a few tcl scripts which are accessed with the tcl package require command. Therefore \fBtclreadline\fP should work with all common extensions like \fBblt, itcl, itk, tix ...\fP. | | | | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | \fBtclreadline\fP is basically a shared library and a few tcl scripts which are accessed with the tcl package require command. Therefore \fBtclreadline\fP should work with all common extensions like \fBblt, itcl, itk, tix ...\fP. .\" .SH SOURCE FILES .SH "COMMANDS" If you want to use \fBtclreadline\fP as a line interface for developing tcl scripts, you probably don't have to read this section. .PP The following list will give all commands, which are currently |
︙ | ︙ | |||
145 146 147 148 149 150 151 | .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. | < < | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | .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. .TP 5 \fB::tclreadline::readline write\fP \fIhistoryfile\fP writes the history to the \fIhistoryfile\fP. This command is called automatically from the internal routine ::tclreadline::Exit. .TP 5 |
︙ | ︙ | |||
188 189 190 191 192 193 194 | 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: | | | > | | | | | < | | < | | | | | | | | | 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 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | 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" The global variable \fBtclreadline_version\fP holds the version number of the tclreadline package. .SH "FILES" the \fB.tclshrc\fP file in the HOME directory, which is read on tclsh startup. Alternatively, the name of this initialization file might be \fB.wishrc\fP ... depending on what interpreter you use. These files should typically contain something like .CS if {$tcl_interactive} { package require tclreadline ::tclreadline::Loop } .CE which will enter the tclreadline main loop. .PP the \fB.tclsh-history\fP file in the HOME directory. On startup commands will be read from this file. On exit, the readline history is written to this file. Note that if you abort tclsh with <cntrl-c> no history is written. For the future it is planned to set up a signal handler, which will write the history on <ctrl-c> before exiting. .PP the \fB.inputrc\fP file in the users HOME directory. This file is used normally for all programs which use the gnu readline (e.g. bash). 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: .CS $if tclreadline "\\C-xp": "puts $env(PATH)" $endif .CE For further documentation please refer to the gnu readline documentation. .SH "BUGS" probably. .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> .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>, David Engel <dlengel@home.com>, <david@debian.org> .SH "DEBIAN PACKAGE" David Engel <dlengel@home.com>, <david@debian.org> .SH "DISCLAIMER" 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. \fBtclreadline\fP comes with the GPL (GNU General Public License). You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |