Skip to content

Commit b099296

Browse files
author
jan.nijtmans
committed
Document that [file dirname [file dirname [info nameofexecutable]]]/lib is also added to $auto_path during initialization.
1 parent b14faba commit b099296

File tree

1 file changed

+30
-35
lines changed

1 file changed

+30
-35
lines changed

doc/tclvars.n

+30-35
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ argc, argv, argv0, auto_path, env, errorCode, errorInfo, tcl_interactive, tcl_li
1717
The following global variables are created and managed automatically
1818
by the Tcl library. Except where noted below, these variables should
1919
normally be treated as read-only by application-specific code and by users.
20+
.\" VARIABLE: auto_path
2021
.TP
2122
\fBauto_path\fR
2223
.
@@ -27,6 +28,7 @@ This variable is initialized during startup to contain, in order:
2728
the directories listed in the \fBTCLLIBPATH\fR environment variable,
2829
the directory named by the \fBtcl_library\fR global variable,
2930
the parent directory of \fBtcl_library\fR,
31+
\fB[file dirname [file dirname [info nameofexecutable]]]/lib\fR,
3032
the directories listed in the \fBtcl_pkgPath\fR variable.
3133
Additional locations to look for files and package indices should
3234
normally be added to this variable using \fBlappend\fR.
@@ -36,6 +38,7 @@ Additional variables relating to package management exist. More
3638
details are listed in the \fBVARIABLES\fR section of the \fBlibrary\fR
3739
manual page.
3840
.RE
41+
.\" VARIABLE: env
3942
.TP
4043
\fBenv\fR
4144
.
@@ -117,6 +120,7 @@ If existing, it has the same effect as running \fBinterp debug\fR
117120
\fB{} -frame 1\fR
118121
as the very first command of each new Tcl interpreter.
119122
.RE
123+
.\" VARIABLE: errorCode
120124
.TP
121125
\fBerrorCode\fR
122126
.
@@ -213,6 +217,7 @@ If none of these methods for setting the error code has been used,
213217
the Tcl interpreter will reset the variable to \fBNONE\fR after
214218
the next error.
215219
.RE
220+
.\" VARIABLE: errorInfo
216221
.TP
217222
\fBerrorInfo\fR
218223
.
@@ -223,6 +228,7 @@ identifying the Tcl commands and procedures that were being executed
223228
when the most recent error occurred.
224229
Its contents take the form of a stack trace showing the various
225230
nested Tcl commands that had been invoked at the time of the error.
231+
.\" VARIABLE: tcl_library
226232
.TP
227233
\fBtcl_library\fR
228234
.
@@ -245,6 +251,7 @@ If \fBTCL_LIBRARY\fR is not set or doesn't refer to an appropriate
245251
directory, then Tcl checks several other directories based on a
246252
compiled-in default location, the location of the binary containing
247253
the application, and the current working directory.
254+
.\" VARIABLE: tcl_patchLevel
248255
.TP
249256
\fBtcl_patchLevel\fR
250257
.
@@ -254,6 +261,7 @@ hold a string giving the current patch level for Tcl, such as
254261
\fB8.5b3\fR for the third beta release of Tcl 8.5.
255262
The value of this variable is returned by the \fBinfo patchlevel\fR
256263
command.
264+
.\" VARIABLE: tcl_pkgPath
257265
.TP
258266
\fBtcl_pkgPath\fR
259267
.
@@ -273,6 +281,7 @@ value is added to \fBauto_path\fR at startup; changes to \fBtcl_pkgPath\fR
273281
are not reflected in \fBauto_path\fR. If you want Tcl to search additional
274282
directories for packages you should add the names of those directories to
275283
\fBauto_path\fR, not \fBtcl_pkgPath\fR.
284+
.\" VARIABLE: tcl_platform
276285
.TP
277286
\fBtcl_platform\fR
278287
.
@@ -285,76 +294,54 @@ retrieve any relevant information. In addition, extensions
285294
and applications may add additional values to the array. The
286295
predefined elements are:
287296
.RS
288-
.TP
289-
\fBbyteOrder\fR
290-
.
297+
.IP \fBbyteOrder\fR
291298
The native byte order of this machine: either \fBlittleEndian\fR or
292299
\fBbigEndian\fR.
293-
.TP
294-
\fBdebug\fR
295-
.
300+
.IP \fBdebug\fR
296301
If this variable exists, then the interpreter was compiled with and linked
297302
to a debug-enabled C run-time. This variable will only exist on Windows,
298303
so extension writers can specify which package to load depending on the
299304
C run-time library that is in use. This is not an indication that this core
300305
contains symbols.
301-
.TP
302-
\fBengine\fR
303-
.
306+
.IP \fBengine\fR
304307
The name of the Tcl language implementation. When the interpreter is first
305308
created, this is always set to the string \fBTcl\fR.
306-
.TP
307-
\fBmachine\fR
308-
.
309+
.IP \fBmachine\fR
309310
The instruction set executed by this machine, such as
310311
\fBintel\fR, \fBPPC\fR, \fB68k\fR, or \fBsun4m\fR. On UNIX machines, this
311312
is the value returned by \fBuname -m\fR.
312-
.TP
313-
\fBos\fR
314-
.
313+
.IP \fBos\fR
315314
The name of the operating system running on this machine,
316315
such as \fBWindows NT\fR or \fBSunOS\fR.
317316
On UNIX machines, this is the value returned by \fBuname -s\fR.
318-
.TP
319-
\fBosVersion\fR
320-
.
317+
.IP \fBosVersion\fR
321318
The version number for the operating system running on this machine.
322319
On UNIX machines, this is the value returned by \fBuname -r\fR.
323-
.TP
324-
\fBpathSeparator\fR
320+
.IP \fBpathSeparator\fR
325321
.VS 8.6
326322
'\" Defined by TIP #315
327323
The character that should be used to \fBsplit\fR PATH-like environment
328324
variables into their corresponding list of directory names.
329325
.VE 8.6
330-
.TP
331-
\fBplatform\fR
332-
.
326+
.IP \fBplatform\fR
333327
Either \fBwindows\fR, or \fBunix\fR. This identifies the
334328
general operating environment of the machine.
335-
.TP
336-
\fBpointerSize\fR
337-
.
329+
.IP \fBpointerSize\fR
338330
This gives the size of the native-machine pointer in bytes (strictly, it
339331
is same as the result of evaluating \fIsizeof(void*)\fR in C.)
340-
.TP
341-
\fBthreaded\fR
342-
.
332+
.IP \fBthreaded\fR
343333
If this variable exists, then the interpreter
344334
was compiled with threads enabled.
345-
.TP
346-
\fBuser\fR
347-
.
335+
.IP \fBuser\fR
348336
This identifies the
349337
current user based on the login information available on the platform.
350338
This value comes from the getuid() and getpwuid() system calls on Unix,
351339
and the value from the GetUserName() system call on Windows.
352-
.TP
353-
\fBwordSize\fR
354-
.
340+
.IP \fBwordSize\fR
355341
This gives the size of the native-machine word in bytes (strictly, it
356342
is same as the result of evaluating \fIsizeof(long)\fR in C.)
357343
.RE
344+
.\" VARIABLE: tcl_precision
358345
.TP
359346
\fBtcl_precision\fR
360347
.
@@ -419,6 +406,7 @@ initialization, then the Tcl startup code will check for the existence
419406
of this file and \fBsource\fR it if it exists. For example, for \fBwish\fR
420407
the variable is set to \fB~/.wishrc\fR for Unix and \fB~/wishrc.tcl\fR
421408
for Windows.
409+
.\" VARIABLE: tcl_traceCompile
422410
.TP
423411
\fBtcl_traceCompile\fR
424412
.
@@ -437,6 +425,7 @@ tracking down suspected problems with the Tcl compiler.
437425
This variable and functionality only exist if
438426
\fBTCL_COMPILE_DEBUG\fR was defined during Tcl's compilation.
439427
.RE
428+
.\" VARIABLE: tcl_traceExec
440429
.TP
441430
\fBtcl_traceExec\fR
442431
.
@@ -463,6 +452,7 @@ and interpreter.
463452
This variable and functionality only exist if
464453
\fBTCL_COMPILE_DEBUG\fR was defined during Tcl's compilation.
465454
.RE
455+
.\" VARIABLE: tcl_wordchars
466456
.TP
467457
\fBtcl_wordchars\fR
468458
.
@@ -474,6 +464,7 @@ selecting a word by double-clicking in text in Tk. It is platform
474464
dependent. On Windows, it defaults to \fB\eS\fR, meaning anything
475465
but a Unicode space character. Otherwise it defaults to \fB\ew\fR,
476466
which is any Unicode word character (number, letter, or underscore).
467+
.\" VARIABLE: tcl_nonwordchars
477468
.TP
478469
\fBtcl_nonwordchars\fR
479470
.
@@ -500,20 +491,24 @@ command.
500491
The following variables are only guaranteed to exist in \fBtclsh\fR
501492
and \fBwish\fR executables; the Tcl library does not define them
502493
itself but many Tcl environments do.
494+
.\" VARIABLE: argc
503495
.TP 6
504496
\fBargc\fR
505497
.
506498
The number of arguments to \fBtclsh\fR or \fBwish\fR.
499+
.\" VARIABLE: argv
507500
.TP 6
508501
\fBargv\fR
509502
.
510503
Tcl list of arguments to \fBtclsh\fR or \fBwish\fR.
504+
.\" VARIABLE: argv0
511505
.TP 6
512506
\fBargv0\fR
513507
.
514508
The script that \fBtclsh\fR or \fBwish\fR started executing (if it was
515509
specified) or otherwise the name by which \fBtclsh\fR or \fBwish\fR
516510
was invoked.
511+
.\" VARIABLE: tcl_interactive
517512
.TP 6
518513
\fBtcl_interactive\fR
519514
.

0 commit comments

Comments
 (0)