diff options
author | dgp <dgp@users.sourceforge.net> | 2003-09-05 21:52:11 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2003-09-05 21:52:11 (GMT) |
commit | c024a2de4b3868a69fd48901c50a0beedb49ed9d (patch) | |
tree | d3430b36c25b01800aa40d815fadb9629ef33770 /doc/tclsh.1 | |
parent | 4383bd1bfc3daa1d69ddcb095a35c5e723f1ba6b (diff) | |
download | tcl-c024a2de4b3868a69fd48901c50a0beedb49ed9d.zip tcl-c024a2de4b3868a69fd48901c50a0beedb49ed9d.tar.gz tcl-c024a2de4b3868a69fd48901c50a0beedb49ed9d.tar.bz2 |
* doc/FileSystem.3: Implementation of
* doc/source.n: TIPs 137/151. Adds
* doc/tclsh.1: a -encoding option to
* generic/tcl.decls: the [source] command
* generic/tclCmdMZ.c (Tcl_SourceObjCmd): and a new C routine,
* generic/tclIOUtil.c (Tcl_FSEvalFileEx): Tcl_FSEvalFileEx(),
* generic/tclMain.c (Tcl_Main): that provides C access
* mac/tclMacResource.c (Tcl_MacSourceObjCmd): to the same function.
* tests/cmdMZ.test: Also adds command line
* tests/main.test: option handling in Tcl_Main() so that tclsh
* tests/source.test: and other apps built on Tcl_Main() respect
a -encoding command line option before a script filename. Docs and
tests updated as well. [Patch 742683]
This is a ***POTENTIAL INCOMPATIBILITY*** only for those C programs
that embed Tcl, build on Tcl_Main(), and make use of Tcl_Main's former
ability to pass a leading "-encoding" option to interactive shell
operations.
* generic/tclInt.decls: Added internal stub
* generic/tclMain.c (Tcl*StartupScript*): table entries for
two new functions Tcl_SetStartupScript() and Tcl_GetStartupScript()
that set/get the path and encoding for the startup script to be
evaluated by either Tcl_Main() or Tk_Main(). Given public names in
anticipation of their exposure by a followup TIP.
* generic/tclDecls.h: make genstubs
* generic/tclIntDecls.h:
* generic/tclStubInit.c:
Diffstat (limited to 'doc/tclsh.1')
-rw-r--r-- | doc/tclsh.1 | 20 |
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 |