Index: tclreadline.n.in ================================================================== --- tclreadline.n.in +++ tclreadline.n.in @@ -1,10 +1,10 @@ .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 00:15:10 1999 (joze)" +.\" LAST MODIFICATION: "Mon Aug 23 22:31:24 1999 (joze)" .\" (C) 1998, 1999 by Johannes Zellner, .\" $Id$ .\" --- .\" .\" tclreadline -- gnu readline for the tcl scripting language @@ -25,20 +25,31 @@ .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\" .\" , http://www.zellner.org/tclreadline/ -.SH NAME +.\" # 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 +.SH "SYNOPSIS" .TP 6 \fB::tclreadline::readline\fP \fIcommand\fP [\fIoptions\fP] -.SH DESCRIPTION +.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 @@ -61,14 +72,14 @@ 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 SOURCE FILES -.SH COMMANDS +.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. @@ -147,17 +158,15 @@ \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. @@ -190,48 +199,48 @@ 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 +.CS package require tclreadline namespace eval tclreadline { proc prompt1 {} { return "[clock format [clock seconds]]> " } } ::tclreadline::Loop -.EN +.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 "EXAMPLES" -.\".SH "ENVIRONMENT VARIABLES" +.\" .SH "ENVIRONMENT VARIABLES" -.SH VARIABLES +.SH "VARIABLES" The global variable \fBtclreadline_version\fP holds the version number of the tclreadline package. -.SH FILES +.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 - -.EQ +.CS if {$tcl_interactive} { package require tclreadline ::tclreadline::Loop } -.EN +.CE which will enter the tclreadline main loop. .PP the \fB.tclsh-history\fP file in the HOME directory. On startup @@ -245,24 +254,23 @@ 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: - -.EQ +.CS $if tclreadline "\\C-xp": "puts $env(PATH)" $endif -.EN +.CE For further documentation please refer to the gnu readline documentation. -.SH BUGS +.SH "BUGS" probably. -.SH SEE ALSO +.SH "SEE ALSO" .PP The official \fBtclreadline\fP web site at: @@ -270,25 +278,25 @@ .RS 4 http://www.zellner.org/tclreadline/ .RE -.SH AUTHOR +.SH "AUTHOR" Johannes Zellner, -.br -.SH CONTRIBUTIONS, SUGGESTIONS AND PATCHES + +.SH "CONTRIBUTIONS, SUGGESTIONS AND PATCHES" Magnus Eriksson , Les Johnson , Harald Kirsch , Christian Krone , Larry W. Virden , David Engel , -.SH DEBIAN PACKAGE +.SH "DEBIAN PACKAGE" David Engel , -.SH DISCLAIMER +.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.