summaryrefslogtreecommitdiffstats
path: root/doc/tclsh.1
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tclsh.1')
-rw-r--r--doc/tclsh.120
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/tclsh.1 b/doc/tclsh.1
index bda9e5e..ea3af4c 100644
--- a/doc/tclsh.1
+++ b/doc/tclsh.1
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: tclsh.1,v 1.8 2003/02/13 22:03:34 kennykb Exp $
+'\" RCS: @(#) $Id: tclsh.1,v 1.9 2003/09/05 21:52:11 dgp Exp $
'\"
.so man.macros
.TH tclsh 1 "" Tcl "Tcl Applications"
@@ -14,7 +14,7 @@
.SH NAME
tclsh \- Simple shell containing Tcl interpreter
.SH SYNOPSIS
-\fBtclsh\fR ?\fIfileName arg arg ...\fR?
+\fBtclsh\fR ?-encoding \fIname\fR? ?\fIfileName arg arg ...\fR?
.BE
.SH DESCRIPTION
@@ -28,18 +28,21 @@ It runs until the \fBexit\fR command is invoked or until it
reaches end-of-file on its standard input.
If there exists a file \fB.tclshrc\fR (or \fBtclshrc.tcl\fR on
the Windows platforms) in the home directory of
-the user, \fBtclsh\fR evaluates the file as a Tcl script
+the user, interactive \fBtclsh\fR evaluates the file as a Tcl script
just before reading the first command from standard input.
.SH "SCRIPT FILES"
.PP
-If \fBtclsh\fR is invoked with arguments then the first argument
-is the name of a script file and any additional arguments
+.VS 8.5
+If \fBtclsh\fR is invoked with arguments then the first few arguments
+specify the name of a script file, and, optionally, the encoding of
+the text data stored in that script file.
+.VE 8.5
+Any additional arguments
are made available to the script as variables (see below).
Instead of reading commands from standard input \fBtclsh\fR will
read Tcl commands from the named file; \fBtclsh\fR will exit
when it reaches the end of the file.
-.VS 8.4
The end of the file may be marked either by the physical end of
the medium, or by the character, '\\032' ('\\u001a', control-Z).
If this character is present in the file, the \fBtclsh\fR application
@@ -47,7 +50,6 @@ will read text up to but not including the character. An application
that requires this character in the file may safely encode it as
``\\032'', ``\\x1a'', or ``\\u001a''; or may generate it by use of commands
such as \fBformat\fR or \fBbinary\fR.
-.VE
There is no automatic evaluation of \fB.tclshrc\fR when the name
of a script file is presented on the \fBtclsh\fR command
line, but the script file can always \fBsource\fR it if desired.
@@ -91,13 +93,11 @@ When \fBtclsh\fR starts up, it treats all three lines as comments,
since the backslash at the end of the second line causes the third
line to be treated as part of the comment on the second line.
.PP
-.VS
You should note that it is also common practise to install tclsh with
its version number as part of the name. This has the advantage of
allowing multiple versions of Tcl to exist on the same system at once,
but also the disadvantage of making it harder to write scripts that
start up uniformly across different versions of Tcl.
-.VE
.SH "VARIABLES"
.PP
@@ -138,7 +138,7 @@ incomplete commands.
See \fBTcl_StandardChannels\fR for more explanations.
.SH "SEE ALSO"
-fconfigure(n), tclvars(n)
+encoding(n), fconfigure(n), tclvars(n)
.SH KEYWORDS
argument, interpreter, prompt, script file, shell