@@ -1,10 +1,10 @@ .TH tclreadline n "@TCLREADLINE_VERSION@.@TCLREADLINE_PATCHLEVEL@" "Johannes Zellner" .\" (C) 1999 by Johannes Zellner -.\" FILE: "/diska/home/joze/src/tclreadline/tclreadline.n.in" -.\" LAST MODIFICATION: "Wed Aug 25 16:32:02 1999 (joze)" +.\" FILE: "/home/joze/src/tclreadline/tclreadline.n.in" +.\" LAST MODIFICATION: "Sat Aug 28 23:38:44 1999 (joze)" .\" (C) 1998, 1999 by Johannes Zellner, .\" $Id$ .\" --- .\" .\" tclreadline -- gnu readline for the tcl scripting language @@ -79,11 +79,15 @@ .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. +this section. In this case the only thing you should do is +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 @@ -168,10 +172,12 @@ .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. +If the variable \fBtclreadline::historyLength\fP is non-negative, +the historyfile will be truncated to hold only this number lines. .TP 5 \fB::tclreadline::Print\fP [\fIyes / no\fP] turns on or off the default behavior of tclsh to print the result of every command. This is turned on by default, so it will just behave @@ -225,24 +231,33 @@ .\" .SH "ENVIRONMENT VARIABLES" .SH "VARIABLES" -\fItclreadline\fP defines the following variables in the global namespace: +\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 +\fBtclreadline::version\fP holds the version string "@TCLREADLINE_VERSION@". .TP 5 -\fBtclreadline_patchLevel\fP +\fBtclreadline::patchLevel\fP holds the patch level string "@TCLREADLINE_VERSION@.@TCLREADLINE_PATCHLEVEL@". .TP 5 -\fBtclreadline_library\fP +\fBtclreadline::library\fP holds the library string "@TCLREADLINE_LIBRARY@". +.TP 5 +\fBtclreadline::historyLength\fP +Number of lines, which will be written to the historyfile. +This number is -1 by default, which means that the historyfile +will not be truncated. See also \fBtclreadline::write\fP. + .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.