Debian Codegraph @

doc/build/modulefile.5

raw
1 '\" t
2 .\" Man page generated from reStructuredText
3 .\" by the Docutils 0.22.4 manpage writer.
4 .
5 .
6 .nr rst2man-indent-level 0
7 .
8 .de1 rstReportMargin
9 \\$1 \\n[an-margin]
10 level \\n[rst2man-indent-level]
11 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
12 -
13 \\n[rst2man-indent0]
14 \\n[rst2man-indent1]
15 \\n[rst2man-indent2]
16 ..
17 .de1 INDENT
18 .\" .rstReportMargin pre:
19 . RS \\$1
20 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
21 . nr rst2man-indent-level +1
22 .\" .rstReportMargin post:
23 ..
24 .de UNINDENT
25 . RE
26 .\" indent \\n[an-margin]
27 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .nr rst2man-indent-level -1
29 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 ..
32 .TH "MODULEFILE" "5" "2026-09-07" "5.6.2" "Modules"
33 .SH NAME
34 modulefile \- files containing Tcl code for the Modules package
35 .SH DESCRIPTION
36 .sp
37 \fImodulefiles\fP are written in the Tool Command Language, \fBTcl(n)\fP and
38 are interpreted by the \fBmodulecmd.tcl\fP program via the module \%<#\:module-1>
39 user interface. \fImodulefiles\fP can be loaded, unloaded, or switched on\-the\-fly
40 while the user is working; and can be used to implement site policies
41 regarding the access and use of applications.
42 .sp
43 A \fImodulefile\fP begins with the \fB#%Module\fP file signature, also called the
44 Modules magic cookie. A version number may be placed after this string. The
45 version number is useful as the \fImodulefile\fP format may change thus it
46 reflects the minimum version of \fBmodulecmd.tcl\fP required to interpret
47 the modulefile. If a version number doesn\(aqt exist, then \fBmodulecmd.tcl\fP
48 will assume the \fImodulefile\fP is compatible. Files without the magic cookie or
49 with a version number greater than the current version of
50 \fBmodulecmd.tcl\fP will not be interpreted. If the
51 \fBmcookie_version_check\fP \%<#\:mconfig-mcookie_version_check> configuration is disabled the version number
52 set is not checked.
53 .sp
54 Each \fImodulefile\fP contains the changes to a user\(aqs environment needed to
55 access an application. Tcl is a simple programming language which permits
56 \fImodulefiles\fP to be arbitrarily complex, depending upon the application\(aqs
57 and the \fImodulefile\fP writer\(aqs needs. If support for extended tcl (tclX)
58 has been configured for your installation of the Modules package, you may
59 use all the extended commands provided by tclX, too.
60 .sp
61 A typical \fImodulefile\fP is a simple bit of code that set or add entries
62 to the \fBPATH\fP, \fBMANPATH\fP, or other environment variables. A
63 Modulefile is evaluated against current \fBmodulecmd.tcl\fP\(aqs mode which
64 leads to specific evaluation results. For instance if the \fImodulefile\fP sets a
65 value to an environment variable, this variable is set when modulefile is
66 loaded and unset when modulefile is unloaded.
67 .sp
68 Tcl has conditional statements that are evaluated when the \fImodulefile\fP is
69 interpreted. This is very effective for managing path or environment changes
70 due to different OS releases or architectures. The user environment
71 information is encapsulated into a single \fImodulefile\fP kept in a central
72 location. The same \fImodulefile\fP is used by every user on any machine. So,
73 from the user\(aqs perspective, starting an application is exactly the same
74 irrespective of the machine or platform they are on.
75 .sp
76 \fImodulefiles\fP also hide the notion of different types of shells. From the
77 user\(aqs perspective, changing the environment for one shell looks exactly
78 the same as changing the environment for another shell. This is useful
79 for new or novice users and eliminates the need for statements such as \(dqif
80 you\(aqre using the C Shell do this ..., otherwise if you\(aqre using the Bourne
81 shell do this ...\(dq. Announcing and accessing new software is uniform and
82 independent of the user\(aqs shell. From the \fImodulefile\fP writer\(aqs perspective,
83 this means one set of information will take care of every type of shell.
84 .SH MODULES SPECIFIC TCL COMMANDS
85 .sp
86 The Modules Package uses commands which are extensions to the \(dqstandard\(dq
87 Tool Command Language \fBTcl(n)\fP package. Unless otherwise specified,
88 the Module commands return the empty string. Some commands behave differently
89 when a \fImodulefile\fP is loaded or unloaded. The command descriptions assume
90 the \fImodulefile\fP is being loaded.
91 .INDENT 0.0
92 .TP
93 .B add\-property name value
94 Associate module tag \fIvalue\fP to currently loading \fImodulefile\fP\&. Argument
95 \fIname\fP is ignored. See \fBmodule\-tag\fP command for more information on
96 tags.
97 .UNINDENT
98 .INDENT 0.0
99 .TP
100 .B always\-load [options] modulefile...
101 Load \fImodulefile\fP and apply the \fBkeep\-loaded\fP tag to it in order to avoid
102 the automatic unload of this \fImodulefile\fP when modules dependent of it are
103 unloaded.
104 .sp
105 \fBalways\-load\fP command accepts the following options:
106 .INDENT 7.0
107 .IP \(bu 2
108 \fB\-\-modulepath modulepathlist\fP
109 .IP \(bu 2
110 \fB\-\-optional\fP
111 .IP \(bu 2
112 \fB\-\-tag taglist\fP
113 .UNINDENT
114 .sp
115 \fImodulefile\fP is declared as a requirement of currently loading module. This
116 command acts as an alias of \fBmodule load\fP command. If more
117 than one \fImodulefile\fP are specified, then this list acts as a Boolean AND
118 operation, which means all specified \fImodulefiles\fP are required.
119 .sp
120 When the \fB\-\-optional\fP option is set, each specified \fImodulefile\fP is
121 declared as an optional requirement. A \fImodulefile\fP that cannot be loaded,
122 will not stop the evaluation.
123 .sp
124 The \fB\-\-tag\fP option accepts a list of module tags to apply to \fImodulefile\fP
125 once loaded in addition to the \fBkeep\-loaded\fP tag. \fItaglist\fP corresponds to
126 the concatenation of multiple tags separated by colon character. \fItaglist\fP
127 should not contain tags inherited from \fImodulefile\fP state or from other
128 modulefile commands. If module is already loaded, tags from \fItaglist\fP are
129 added to the list of tags already applied to this module.
130 .sp
131 The \fB\-\-modulepath\fP option accepts a list of modulepath. \fImodulepathlist\fP
132 corresponds to the concatenation of multiple modulepaths separated by colon
133 character. When this option is set, required \fImodulefile\fP should be located
134 within one of the listed modulepaths. A path in this list may correspond to
135 the first path elements of an actual modulepath (e.g., \fB/path/to\fP will
136 match modulefiles located into the \fB/path/to/modulefiles\fP modulepath
137 directory).
138 .sp
139 If an attempt to load \fImodulefile\fP is performed and \fB\-\-modulepath\fP option
140 is set, \fImodulefile\fP will be searched in the enabled modulepaths whose start
141 match one of the specified paths and in the specified paths not matching any
142 enabled modulepaths. For instance if this option is set to
143 \fB/path/to:/another/path\fP and \fB/path/to/modulefiles\fP is currently the sole
144 enabled modulepath, \fImodulefile\fP will be searched into
145 \fB/path/to/modulefiles\fP and \fB/another/path\fP directories.
146 .UNINDENT
147 .INDENT 0.0
148 .TP
149 .B append\-path [\-d C|\-\-delim C|\-\-delim=C] [\-\-duplicates] variable value...
150 See \fBprepend\-path\fP\&.
151 .UNINDENT
152 .INDENT 0.0
153 .TP
154 .B break
155 This is not a Modules\-specific command, it\(aqs actually part of Tcl, which
156 has been overloaded similar to the \fBcontinue\fP and \fBexit\fP
157 commands to have the effect of causing the module not to be listed as loaded
158 and not affect other modules being loaded concurrently. All non\-environment
159 commands within the module will be performed up to this point. Processing
160 will continue on to the next module on the command line unless if
161 \fBabort_on_error\fP \%<#\:mconfig-abort_on_error> configuration option is enabled for running module
162 sub\-command. The \fBbreak\fP command will only have this effect if not
163 used within a Tcl loop though.
164 .sp
165 An example: Suppose that a full selection of \fImodulefiles\fP are needed for
166 various different architectures, but some of the \fImodulefiles\fP are not
167 needed and the user should be alerted. Having the unnecessary \fImodulefile\fP
168 be a link to the following \fBnotavail\fP \fImodulefile\fP will perform the task
169 as required.
170 .INDENT 7.0
171 .INDENT 3.5
172 .sp
173 .EX
174 #%Module
175
176 module\-help {This module does nothing but alert the user}
177 module\-help \(dqthat the [module\-info name] module is not available\(dq
178
179 module\-whatis {Notifies user that module is not available.}
180
181 set curMod [module\-info name]
182 if {[module\-info mode load]} {
183 puts stderr \(dqNote: \(aq$curMod\(aq is not available for [uname sysname].\(dq
184 }
185 break
186 .EE
187 .UNINDENT
188 .UNINDENT
189 .sp
190 Modulefile using \fBbreak\fP command when unloading may be unloaded anyway
191 if \fB\-\-force\fP \%<#\:cmdoption-force> option is set. To forbid the unload of a modulefile, it
192 is recommended to tag it \fBsuper\-sticky\fP with \fBmodule\-tag\fP command.
193 .UNINDENT
194 .INDENT 0.0
195 .TP
196 .B chdir directory
197 Set the current working directory to \fIdirectory\fP\&.
198 .UNINDENT
199 .INDENT 0.0
200 .TP
201 .B complete shell name body
202 Define shell completion for command \fIname\fP with specified \fIbody\fP if \fIshell\fP
203 is the current shell under which \fBmodulecmd.tcl\fP was invoked. \fIBody\fP
204 corresponds to argument options accepted by the shell command which
205 defines completion. When a \fImodulefile\fP is unloaded, \fBcomplete\fP
206 becomes \fBuncomplete\fP\&.
207 .sp
208 The following \fIshells\fP are supported: bash, tcsh, bash and fish. Please refer
209 to the documentation of these shells to learn how to define completion. The
210 command is ignored if an unsupported shell is specified.
211 .UNINDENT
212 .INDENT 0.0
213 .TP
214 .B conflict modulefile...
215 \fBconflict\fP controls whether or not the \fImodulefile\fP will be loaded.
216 The \fBconflict\fP command lists \fImodulefiles\fP which conflict with the
217 current \fImodulefile\fP\&. If a list contains more than one \fImodulefile\fP, then
218 each member of the list acts as a Boolean OR operation. Multiple
219 \fBconflict\fP commands may be used to create a Boolean AND operation. If
220 one of the requirements have not been satisfied, an error is reported and the
221 current \fImodulefile\fP makes no changes to the user\(aqs environment.
222 .sp
223 If an argument for \fBconflict\fP is a directory and any other
224 \fImodulefile\fP from that directory has been loaded, then a conflict will occur.
225 For example, specifying X11 as a \fBconflict\fP will stop X11/R4 and
226 X11/R5 from being loaded at the same time.
227 .sp
228 The parameter \fImodulefile\fP may also be a symbolic modulefile name or a
229 modulefile alias. It may also leverage a specific syntax to finely select
230 module version (see Advanced module version specifiers section below).
231 .sp
232 If the \fBconflict_unload\fP \%<#\:mconfig-conflict_unload> and \fBauto_handling\fP \%<#\:mconfig-auto_handling> configuration
233 options are enabled, \fBconflict\fP will attempt to unload all loaded
234 modules that match specification. (see Automated module handling
235 mechanisms \%<#\:modules-auto-handling> in module \%<#\:module-1>).
236 .UNINDENT
237 .INDENT 0.0
238 .TP
239 .B continue
240 This is not a modules specific command but another overloaded Tcl command
241 and is similar to the \fBbreak\fP or \fBexit\fP commands except the
242 module will be listed as loaded as well as performing any environment or Tcl
243 commands up to this point and then continuing on to the next module on
244 the command line. The \fBcontinue\fP command will only have this effect if
245 not used within a Tcl loop though.
246 .UNINDENT
247 .INDENT 0.0
248 .TP
249 .B depends\-on [options] modulefile...
250 Alias of \fBprereq\-all\fP command.
251 .UNINDENT
252 .INDENT 0.0
253 .TP
254 .B depends\-on\-any [options] modulefile...
255 Alias of \fBprereq\fP command.
256 .UNINDENT
257 .INDENT 0.0
258 .TP
259 .B exit [N]
260 This is not a modules specific command but another overloaded Tcl command
261 and is similar to the \fBbreak\fP or \fBcontinue\fP commands. However,
262 this command will cause the immediate cessation of this module. Any
263 additional modules on the command line will not be evaluated even if the
264 \fBabort_on_error\fP \%<#\:mconfig-abort_on_error> configuration option is disabled for running
265 module sub\-command. This module and the subsequent modules will not be listed
266 as loaded. No environment commands will be performed in the current module.
267 .UNINDENT
268 .INDENT 0.0
269 .TP
270 .B extensions modulefile...
271 Alias of \fBprovide\fP command.
272 .UNINDENT
273 .INDENT 0.0
274 .TP
275 .B family name
276 Defines loading modulefile as a member of family \fIname\fP\&. Only one member of a
277 family could be loaded. Error is raised when attempting to load another
278 member of the same family \fIname\fP\&.
279 .sp
280 \fBfamily\fP corresponds to the definition of a \fBconflict\fP on
281 \fIname\fP and the definition of a \fBmodule\-alias\fP \fIname\fP targeting
282 currently loading module.
283 .sp
284 In addition, the \fBMODULES_FAMILY_<NAME>\fP \%<#\:envvar-MODULES_FAMILY_-NAME> environment variable is
285 defined and set to the currently loading module name minus version. This
286 variable helps to know what module provides for the family \fIname\fP in the
287 currently loaded environment. For instance if loading modulefile \fBfoo/1.0\fP
288 defines being member of the \fBbar\fP family, the
289 \fBMODULES_FAMILY_BAR\fP \%<#\:envvar-MODULES_FAMILY_-NAME> will be set to the
290 \fBfoo\fP value. For compatibility, the \fBLMOD_FAMILY_<NAME>\fP
291 environment variable is also defined and set to the same value than
292 \fBMODULES_FAMILY_<NAME>\fP \%<#\:envvar-MODULES_FAMILY_-NAME>\&.
293 .sp
294 \fIname\fP should be a non\-empty string only containing characters that could be
295 part of an environment variable name (i.e., \fI[a\-zA\-Z0\-9_]\fP).
296 .sp
297 If the \fBconflict_unload\fP \%<#\:mconfig-conflict_unload> and \fBauto_handling\fP \%<#\:mconfig-auto_handling> configuration
298 options are enabled, an attempt to unload loaded module that defines the same
299 family is made. (see Automated module handling
300 mechanisms \%<#\:modules-auto-handling> in module \%<#\:module-1>).
301 .UNINDENT
302 .INDENT 0.0
303 .TP
304 .B getenv [\-\-return\-value] variable [value]
305 Returns value of environment \fIvariable\fP\&. If \fIvariable\fP is not defined,
306 \fIvalue\fP is returned if set, an empty string is returned otherwise. The
307 \fBgetenv\fP command should be preferred over the Tcl global variable
308 \fBenv\fP to query environment variables.
309 .sp
310 When modulefile is evaluated in \fIdisplay\fP mode, \fBgetenv\fP returns
311 \fIvariable\fP name prefixed with dollar sign (e.g., \fB$variable\fP) unless if the
312 \fB\-\-return\-value\fP option is set. When this option is set the value of
313 environment \fIvariable\fP or defined fallback value is returned in \fIdisplay\fP
314 mode.
315 .UNINDENT
316 .INDENT 0.0
317 .TP
318 .B getvariant [\-\-return\-value] variant [value]
319 Returns value of designated \fIvariant\fP\&. If \fIvariant\fP is not defined, \fIvalue\fP
320 is returned if set, an empty string is returned otherwise. The
321 \fBgetvariant\fP command should be preferred over the
322 \fBModuleVariant\fP Tcl array to query a variant value.
323 .sp
324 When modulefile is evaluated in \fIdisplay\fP mode, \fBgetvariant\fP returns
325 \fIvariant\fP name enclosed in curly braces (e.g., \fB{variant}\fP) unless if the
326 \fB\-\-return\-value\fP option is set. When this option is set the value of
327 \fIvariant\fP or defined fallback value is returned in \fIdisplay\fP mode.
328 .UNINDENT
329 .INDENT 0.0
330 .TP
331 .B haveDynamicMPATH
332 \fBhaveDynamicMPATH\fP command signals that a modulefile modifies the
333 \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH> environment variable. It is useful when the modulefile
334 conditionally updates \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH> and is processed by Lmod tool.
335 .sp
336 Here in the Modules tool, this command is implemented as a \fIno\-operation\fP,
337 since the \fBspider\fP \%<#\:subcmd-spider> sub\-command evaluates the modulefile in the
338 context of the current user to determine whether \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH> is
339 updated.
340 .UNINDENT
341 .INDENT 0.0
342 .TP
343 .B hide\-modulefile modulefile
344 Alias of \fBmodule\-hide\fP command.
345 .UNINDENT
346 .INDENT 0.0
347 .TP
348 .B hide\-version modulefile
349 Alias of \fBmodule\-hide\fP command.
350 .UNINDENT
351 .INDENT 0.0
352 .TP
353 .B is\-avail modulefile...
354 The \fBis\-avail\fP command returns a true value if any of the listed
355 \fImodulefiles\fP exists in enabled \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH>\&. If a list contains more
356 than one \fImodulefile\fP, then each member acts as a boolean OR operation. If an
357 argument for \fBis\-avail\fP is a directory and a \fImodulefile\fP exists in
358 the directory \fBis\-avail\fP would return a true value.
359 .sp
360 The parameter \fImodulefile\fP may also be a symbolic modulefile name or a
361 modulefile alias. It may also leverage a specific syntax to finely select
362 module version (see Advanced module version specifiers section below).
363 .UNINDENT
364 .INDENT 0.0
365 .TP
366 .B is\-loaded [modulefile...]
367 The \fBis\-loaded\fP command returns a true value if any of the listed
368 \fImodulefiles\fP has been loaded or if any \fImodulefile\fP is loaded in case no
369 argument is provided. If a list contains more than one \fImodulefile\fP, then
370 each member acts as a boolean OR operation. If an argument for
371 \fBis\-loaded\fP is a directory and any \fImodulefile\fP from the directory has
372 been loaded \fBis\-loaded\fP would return a true value.
373 .sp
374 The parameter \fImodulefile\fP may also be a symbolic modulefile name or a
375 modulefile alias. It may also leverage a specific syntax to finely select
376 module version (see Advanced module version specifiers section below).
377 .UNINDENT
378 .INDENT 0.0
379 .TP
380 .B is\-saved [collection...]
381 The \fBis\-saved\fP command returns a true value if any of the listed
382 \fIcollections\fP exists or if any \fIcollection\fP exists in case no argument is
383 provided. If a list contains more than one \fIcollection\fP, then each member
384 acts as a boolean OR operation.
385 .sp
386 If \fBMODULES_COLLECTION_TARGET\fP \%<#\:envvar-MODULES_COLLECTION_TARGET> is set, a suffix equivalent to the
387 value of this variable is appended to the passed \fIcollection\fP name. In case
388 no \fIcollection\fP argument is provided, a true value will only be returned if
389 a collection matching currently set target exists.
390 .UNINDENT
391 .INDENT 0.0
392 .TP
393 .B is\-used [directory...]
394 The \fBis\-used\fP command returns a true value if any of the listed
395 \fIdirectories\fP has been enabled in \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH> or if any \fIdirectory\fP
396 is enabled in case no argument is provided. If a list contains more than one
397 \fIdirectory\fP, then each member acts as a boolean OR operation.
398 .UNINDENT
399 .INDENT 0.0
400 .TP
401 .B lsb\-release field
402 Provide certain Linux Standard Base (LSB) information. \fBlsb\-release\fP
403 will invoke the \fBlsb_release(1)\fP command to get each \fIfield\fP
404 information.
405 .sp
406 \fIfield\fP values are:
407 .INDENT 7.0
408 .IP \(bu 2
409 \fBid\fP: string id of distributor
410 .IP \(bu 2
411 \fBrelease\fP: release number of distribution
412 .IP \(bu 2
413 \fBcodename\fP: codename according to distribution release
414 .UNINDENT
415 .UNINDENT
416 .INDENT 0.0
417 .TP
418 .B module [sub\-command] [sub\-command\-options] [sub\-command\-args]
419 This command permits a \fImodulefile\fP to \fBload\fP \%<#\:subcmd-load> or \fBunload\fP \%<#\:subcmd-unload>
420 other \fImodulefiles\fP or to \fBuse\fP \%<#\:subcmd-use> or \fBunuse\fP \%<#\:subcmd-unuse> \fImodulepaths\fP\&. No
421 checks are made to ensure that the \fImodulefile\fP does not try to load itself.
422 Often it is useful to have a single \fImodulefile\fP that performs a number of
423 \fBmodule load\fP commands. For example, if every user on the system requires a
424 basic set of applications loaded, then a core \fImodulefile\fP would contain the
425 necessary \fBmodule load\fP commands.
426 .sp
427 The \fB\-\-not\-req\fP option may be set for the \fBload\fP, \fBtry\-load\fP,
428 \fBload\-any\fP, \fBunload\fP and \fBswitch\fP sub\-commands to inhibit the
429 definition of an implicit prereq or conflict requirement onto specified
430 modules.
431 .sp
432 On \fBtry\-load\fP sub\-command, \fImodulefiles\fP are considered optional prereq
433 requirement. However an error is raised if they cannot be loaded unless if
434 they are not found or forbidden.
435 .sp
436 The \fBload\-any\fP sub\-command loads one \fImodulefile\fP from the specified list.
437 An error is obtained if no \fImodulefile\fP from the list can be loaded. No
438 operation is performed if a \fImodulefile\fP from the list is found already
439 loaded.
440 .sp
441 The \fBunload\fP sub\-command unloads one matching \fImodulefile\fP for each module
442 specification provided as argument if \fBauto_handling\fP \%<#\:mconfig-auto_handling> or
443 \fBconflict_unload\fP \%<#\:mconfig-conflict_unload> configuration options are disabled. When both
444 options are enabled, \fBunload\fP removes all loaded modules matching each
445 module specification. When both options are enabled, modules dependent of the
446 unloaded modules are also unloaded. Otherwise an error is raised if module to
447 unload has a dependent module loaded.
448 .sp
449 If the \fBrequire_via\fP \%<#\:mconfig-require_via> configuration option is enabled, the \fBuse\fP
450 sub\-command defines a requirement of modulefiles stored in the added
451 modulepath onto current \fImodulefile\fP\&.
452 .sp
453 The \fBunuse\fP sub\-command accepts the \fB\-\-remove\-on\-unload\fP,
454 \fB\-\-noop\-on\-unload\fP, \fB\-\-append\-on\-unload\fP and \fB\-\-prepend\-on\-unload\fP
455 options to control the behavior to apply when \fImodulefile\fP is unloaded. See
456 \fBremove\-path\fP for further explanation.
457 .sp
458 The \fBload\fP, \fBtry\-load\fP, \fBload\-any\fP and \fBswitch\fP sub\-commands accept
459 the \fB\-\-tag\fP option to apply specified tags to \fImodulefile\fP once loaded.
460 Option accepts a concatenation of multiple module tags separated by colon
461 character. \fItaglist\fP should not contain tags inherited from \fImodulefile\fP
462 state or from other modulefile commands. If module is already loaded, tags
463 from \fItaglist\fP are added to the list of tags already applied to this module.
464 .sp
465 Command line switches \fB\-\-auto\fP \%<#\:cmdoption-auto>, \fB\-\-no\-auto\fP \%<#\:cmdoption-no-auto> and
466 \fB\-\-force\fP \%<#\:cmdoption-force> are ignored when passed to a \fBmodule\fP command set in
467 a \fImodulefile\fP\&.
468 .sp
469 Not all the \fIsub\-commands\fP described in the Module Sub\-Commands \%<#\:module-sub-commands>
470 section of the module \%<#\:module-1> man page are available when \fBmodule\fP
471 is used as a Modules specific Tcl command. The following table summarizes the
472 different sub\-commands available for each interpretation context.
473 .TS
474 box center;
475 l|l|l.
476 T{
477 Sub\-commands available from
478 modulefile interpretation
479 T} T{
480 Sub\-commands available from \fBinitrc\fP configuration
481 file and sourced
482 script file
483 T} T{
484 Sub\-commands available from run\-command (rc) file
485 interpretation
486 T}
487 _
488 T{
489 \fBload\fP \%<#\:subcmd-load>,
490 \fBload\-any\fP \%<#\:subcmd-load-any>,
491 \fBswitch\fP \%<#\:subcmd-switch>,
492 \fBtry\-load\fP \%<#\:subcmd-try-load>,
493 \fBunload\fP \%<#\:subcmd-unload>,
494 \fBunuse\fP \%<#\:subcmd-unuse>, \fBuse\fP \%<#\:subcmd-use>\&.
495 Also available but not recommended for use from regular
496 modulefile: \fBaliases\fP \%<#\:subcmd-aliases>,
497 \fBavail\fP \%<#\:subcmd-avail>,
498 \fBdisplay\fP \%<#\:subcmd-display>,
499 \fBinitadd\fP \%<#\:subcmd-initadd>,
500 \fBinitclear\fP \%<#\:subcmd-initclear>,
501 \fBinitlist\fP \%<#\:subcmd-initlist>,
502 \fBinitprepend\fP \%<#\:subcmd-initprepend>,
503 \fBinitrm\fP \%<#\:subcmd-initrm>,
504 \fBinitswitch\fP \%<#\:subcmd-initswitch>,
505 \fBlist\fP \%<#\:subcmd-list>,
506 \fBpurge\fP \%<#\:subcmd-purge>,
507 \fBreload\fP \%<#\:subcmd-reload>,
508 \fBrestore\fP \%<#\:subcmd-restore>,
509 \fBsave\fP \%<#\:subcmd-save>,
510 \fBsavelist\fP \%<#\:subcmd-savelist>,
511 \fBsaverm\fP \%<#\:subcmd-saverm>,
512 \fBsaveshow\fP \%<#\:subcmd-saveshow>,
513 \fBsearch\fP \%<#\:subcmd-search>,
514 \fBtest\fP \%<#\:subcmd-test>,
515 \fBwhatis\fP \%<#\:subcmd-whatis>
516 T} T{
517 Same sub\-commands
518 available than for
519 modulefile and
520 \fBconfig\fP \%<#\:subcmd-config>
521 sub\-command.
522 T} T{
523 \fINone\fP
524 T}
525 .TE
526 .UNINDENT
527 .INDENT 0.0
528 .TP
529 .B module\-alias name modulefile
530 Assigns the \fImodulefile\fP to the alias \fIname\fP\&. This command should be
531 placed in one of the \fBmodulecmd.tcl\fP rc files in order to provide
532 shorthand invocations of frequently used \fImodulefile\fP names.
533 .sp
534 The parameter \fImodulefile\fP may be either
535 .INDENT 7.0
536 .IP \(bu 2
537 a fully qualified \fImodulefile\fP with name and version
538 .IP \(bu 2
539 a symbolic \fImodulefile\fP name
540 .IP \(bu 2
541 another \fImodulefile\fP alias
542 .UNINDENT
543 .UNINDENT
544 .INDENT 0.0
545 .TP
546 .B module\-forbid [options] modulefile...
547 Forbid use of \fImodulefile\fP\&. An error is obtained when trying to evaluate a
548 forbidden module. This command should be placed in one of the
549 \fBmodulecmd.tcl\fP rc files.
550 .sp
551 \fBmodule\-forbid\fP command accepts the following options:
552 .INDENT 7.0
553 .IP \(bu 2
554 \fB\-\-after datetime\fP
555 .IP \(bu 2
556 \fB\-\-before datetime\fP
557 .IP \(bu 2
558 \fB\-\-not\-user {user...}\fP
559 .IP \(bu 2
560 \fB\-\-not\-group {group...}\fP
561 .IP \(bu 2
562 \fB\-\-user {user...}\fP
563 .IP \(bu 2
564 \fB\-\-group {group...}\fP
565 .IP \(bu 2
566 \fB\-\-message {text message}\fP
567 .IP \(bu 2
568 \fB\-\-nearly\-message {text message}\fP
569 .UNINDENT
570 .sp
571 If \fB\-\-after\fP option is set, forbidding is only effective after specified
572 date time. Following the same principle, if \fB\-\-before\fP option is set,
573 forbidding is only effective before specified date time. Accepted date time
574 format is \fBYYYY\-MM\-DD[THH:MM]\fP\&. If no time (\fBHH:MM\fP) is specified,
575 \fB00:00\fP is assumed. \fB\-\-after\fP and \fB\-\-before\fP options are not supported
576 on Tcl versions prior to 8.5.
577 .sp
578 If \fB\-\-not\-user\fP option is set, forbidding is not applied if the username of
579 the user currently running \fBmodulecmd.tcl\fP is part of the list of
580 username specified. Following the same approach, if \fB\-\-not\-group\fP option is
581 set, forbidding is not applied if current user is member of one of the groups
582 specified. When both options are set, forbidding is not applied if a match is
583 found for \fB\-\-not\-user\fP or \fB\-\-not\-group\fP\&.
584 .sp
585 If \fB\-\-user\fP option is set, forbidding is applied only if the username of
586 the user currently running \fBmodulecmd.tcl\fP is part of the list of
587 username specified. Following the same approach, if \fB\-\-group\fP option is
588 set, forbidding is applied only if current user is member of one of the
589 groups specified. When both options are set, forbidding is applied if a match
590 is found for \fB\-\-user\fP or \fB\-\-group\fP\&. If the same user name is set on both
591 \fB\-\-user\fP and \fB\-\-not\-user\fP options, \fB\-\-user\fP prevails over
592 \fB\-\-not\-user\fP\&. If the same group name is set on both \fB\-\-group\fP and
593 \fB\-\-not\-group\fP, \fB\-\-group\fP prevails over \fB\-\-not\-group\fP\&.
594 .sp
595 Error message returned when trying to evaluate a forbidden module can be
596 supplemented with the \fItext message\fP set through \fB\-\-message\fP option.
597 .sp
598 If \fB\-\-after\fP option is set, modules are considered \fInearly forbidden\fP
599 during a number of days defined by the \fBnearly_forbidden_days\fP \%<#\:mconfig-nearly_forbidden_days>
600 \fBmodulecmd.tcl\fP configuration option
601 (see \fBMODULES_NEARLY_FORBIDDEN_DAYS\fP \%<#\:envvar-MODULES_NEARLY_FORBIDDEN_DAYS>), prior reaching the expiry
602 date fixed by \fB\-\-after\fP option. When a \fInearly forbidden\fP module is
603 evaluated a warning message is issued to inform module will soon be
604 forbidden. This warning message can be supplemented with the \fItext message\fP
605 set through \fB\-\-nearly\-message\fP option.
606 .sp
607 If a \fBmodule\-forbid\fP command applies to a \fImodulefile\fP also targeted
608 by a \fBmodule\-hide \-\-hard\fP command, this module is
609 unveiled when precisely named to return an access error.
610 .sp
611 Forbidden modules included in the result of \fBavail\fP \%<#\:subcmd-avail> or
612 \fBspider\fP \%<#\:subcmd-spider> sub\-commands are reported with a \fBforbidden\fP tag applied
613 to them. Nearly forbidden modules included in the result of \fBavail\fP \%<#\:subcmd-avail>,
614 \fBlist\fP \%<#\:subcmd-list> or \fBspider\fP \%<#\:subcmd-spider> sub\-commands are reported with a
615 \fBnearly\-forbidden\fP tag applied to them. See Module tags \%<#\:module-tags> section in
616 module \%<#\:module-1>\&.
617 .sp
618 The parameter \fImodulefile\fP may leverage a specific syntax to finely select
619 module version (see Advanced module version specifiers section below). It
620 may also be a full path file name to precisely designate one module in a
621 specific modulepath.
622 .UNINDENT
623 .INDENT 0.0
624 .TP
625 .B module\-help string
626 Defines a string which is displayed in case of the invocation of the
627 \fBmodule help\fP \%<#\:subcmd-help> command. This command takes no action on non\-help
628 \fImodulefile\fP evaluation.
629 .sp
630 Multi\-word \fIstring\fP should be enclosed in curly\-braces or double\-quotes.
631 There may be more than one \fBmodule\-help\fP command call in a
632 \fImodulefile\fP\&. In which case each command call is reported as a separate line.
633 .sp
634 If a \fImodulefile\fP also defines a \fBModulesHelp\fP procedure, the text defined
635 with \fBmodule\-help\fP is printed before running this procedure on
636 \fBhelp\fP evaluation mode.
637 .UNINDENT
638 .INDENT 0.0
639 .TP
640 .B module\-hide [options] modulefile...
641 Hide \fImodulefile\fP to exclude it from available module search or module
642 selection unless query refers to \fImodulefile\fP by its exact name. This command
643 should be placed in one of the \fBmodulecmd.tcl\fP rc files.
644 .sp
645 \fBmodule\-hide\fP command accepts the following options:
646 .INDENT 7.0
647 .IP \(bu 2
648 \fB\-\-soft|\-\-hard\fP
649 .IP \(bu 2
650 \fB\-\-hidden\-loaded\fP
651 .IP \(bu 2
652 \fB\-\-after datetime\fP
653 .IP \(bu 2
654 \fB\-\-before datetime\fP
655 .IP \(bu 2
656 \fB\-\-not\-user {user...}\fP
657 .IP \(bu 2
658 \fB\-\-not\-group {group...}\fP
659 .IP \(bu 2
660 \fB\-\-user {user...}\fP
661 .IP \(bu 2
662 \fB\-\-group {group...}\fP
663 .UNINDENT
664 .sp
665 When \fB\-\-soft\fP option is set, \fImodulefile\fP is also set hidden, but hiding is
666 disabled when search or selection query\(aqs root name matches module\(aqs root
667 name. This soft hiding mode enables to hide modulefiles from bare module
668 availability listing yet keeping the ability to select such module for load
669 with the regular resolution mechanism (i.e., no need to use module exact name
670 to select it)
671 .sp
672 When \fB\-\-hard\fP option is set, \fImodulefile\fP is also set hidden and stays
673 hidden even if search or selection query refers to \fImodulefile\fP by its exact
674 name.
675 .sp
676 When \fB\-\-hidden\-loaded\fP option is set, hidden state also applies to the
677 \fImodulefile\fP when it is loaded. Hidden loaded modules do not appear on
678 \fBlist\fP \%<#\:subcmd-list> sub\-command output, unless \fB\-\-all\fP \%<#\:cmdoption-all> option is set.
679 Their loading or unloading informational messages are not reported unless the
680 \fBverbosity of Modules\fP \%<#\:envvar-MODULES_VERBOSITY> is set to a level higher
681 than \fBverbose\fP\&. Hidden loaded modules are detected in any cases by state
682 query commands like \fBis\-loaded\fP\&.
683 .sp
684 If \fB\-\-after\fP option is set, hiding is only effective after specified date
685 time. Following the same principle, if \fB\-\-before\fP option is set, hiding is
686 only effective before specified date time. Accepted date time format is
687 \fBYYYY\-MM\-DD[THH:MM]\fP\&. If no time (\fBHH:MM\fP) is specified, \fB00:00\fP is
688 assumed. \fB\-\-after\fP and \fB\-\-before\fP options are not supported on Tcl
689 versions prior to 8.5.
690 .sp
691 If \fB\-\-not\-user\fP option is set, hiding is not applied if the username of the
692 user currently running \fBmodulecmd.tcl\fP is part of the list of username
693 specified. Following the same approach, if \fB\-\-not\-group\fP option is set,
694 hiding is not applied if current user is member of one of the groups
695 specified. When both options are set, hiding is not applied if a match is
696 found for \fB\-\-not\-user\fP or \fB\-\-not\-group\fP\&.
697 .sp
698 If \fB\-\-user\fP option is set, hiding is applied only if the username of the
699 user currently running \fBmodulecmd.tcl\fP is part of the list of username
700 specified. Following the same approach, if \fB\-\-group\fP option is set, hiding
701 is applied only if current user is member of one of the groups specified.
702 When both options are set, hiding is applied if a match is found for
703 \fB\-\-user\fP or \fB\-\-group\fP\&. If the same user name is set on both \fB\-\-user\fP
704 and \fB\-\-not\-user\fP options, \fB\-\-user\fP prevails over \fB\-\-not\-user\fP\&. If the
705 same group name is set on both \fB\-\-group\fP and \fB\-\-not\-group\fP, \fB\-\-group\fP
706 prevails over \fB\-\-not\-group\fP\&.
707 .sp
708 If the \fB\-\-all\fP \%<#\:cmdoption-all> option is set on \fBavail\fP \%<#\:subcmd-avail>, \fBaliases\fP \%<#\:subcmd-aliases>,
709 \fBwhatis\fP \%<#\:subcmd-whatis>, \fBsearch\fP \%<#\:subcmd-search> or \fBspider\fP \%<#\:subcmd-spider> sub\-commands, hiding
710 is disabled thus hidden modulefiles are included in module search.
711 Hard\-hidden modules (i.e., declared hidden with \fB\-\-hard\fP option) are not
712 affected by \fB\-\-all\fP \%<#\:cmdoption-all> and stay hidden even if option is set.
713 \fB\-\-all\fP \%<#\:cmdoption-all> option does not apply to \fImodule selection\fP sub\-commands like
714 \fBload\fP \%<#\:subcmd-load>\&. Thus in such context a hidden module should always be
715 referred by its exact full name (e.g., \fBfoo/1.2.3\fP not \fBfoo\fP) unless if
716 it has been hidden in \fB\-\-soft\fP mode. A hard\-hidden module cannot be
717 unveiled or selected in any case.
718 .sp
719 If several \fBmodule\-hide\fP commands target the same \fImodulefile\fP, the
720 strongest hiding level is retained which means if both a regular, a
721 \fB\-\-soft\fP hiding command match a given module, regular hiding mode is
722 considered. If both a regular and a \fB\-\-hard\fP hiding command match a given
723 module, hard hiding mode is retained. A set \fB\-\-hidden\-loaded\fP option is
724 retained even if the \fBmodule\-hide\fP statement on which it is declared
725 is superseded by a stronger \fBmodule\-hide\fP statement with no
726 \fB\-\-hidden\-loaded\fP option set.
727 .sp
728 Hidden modules included in the result of \fBavail\fP \%<#\:subcmd-avail> or \fBspider\fP \%<#\:subcmd-spider>
729 sub\-commands are reported with a \fBhidden\fP tag applied to them. Hidden
730 loaded modules included in the result of \fBlist\fP \%<#\:subcmd-list> sub\-command are
731 reported with a \fBhidden\-loaded\fP tag applied to them. This tag is not
732 reported on \fBavail\fP \%<#\:subcmd-avail> or \fBspider\fP \%<#\:subcmd-spider> sub\-commands context. See
733 Module tags \%<#\:module-tags> section in module \%<#\:module-1>\&.
734 .sp
735 The parameter \fImodulefile\fP may also be a symbolic modulefile name or a
736 modulefile alias. It may also leverage a specific syntax to finely select
737 module version (see Advanced module version specifiers section below).
738 Moreover it may also be a full path file name to precisely designate one
739 module in a specific modulepath.
740 .UNINDENT
741 .INDENT 0.0
742 .TP
743 .B module\-info option [info\-args]
744 Provide information about the \fBmodulecmd.tcl\fP program\(aqs state. Some of
745 the information is specific to the internals of \fBmodulecmd.tcl\fP\&.
746 \fIoption\fP is the type of information to be provided, and \fIinfo\-args\fP are any
747 arguments needed.
748 .sp
749 \fBmodule\-info alias\fP name
750 .INDENT 7.0
751 .INDENT 3.5
752 Returns the full \fImodulefile\fP name to which the \fImodulefile\fP alias \fIname\fP
753 is assigned
754 .UNINDENT
755 .UNINDENT
756 .sp
757 \fBmodule\-info command\fP [commandname]
758 .INDENT 7.0
759 .INDENT 3.5
760 Returns the currently running \fBmodulecmd.tcl\fP\(aqs command as a string
761 if no \fIcommandname\fP is given.
762 .sp
763 Returns \fB1\fP if \fBmodulecmd.tcl\fP\(aqs command is \fIcommandname\fP\&.
764 \fIcommandname\fP can be: \fBload\fP, \fBunload\fP, \fBrefresh\fP, \fBreload\fP,
765 \fBsource\fP, \fBswitch\fP, \fBdisplay\fP, \fBavail\fP, \fBaliases\fP, \fBlist\fP,
766 \fBwhatis\fP, \fBsearch\fP, \fBpurge\fP, \fBrestore\fP, \fBhelp\fP, \fBtest\fP,
767 \fBtry\-load\fP, \fBload\-any\fP, \fBmod\-to\-sh\fP, \fBreset\fP, \fBstash\fP,
768 \fBstashpop\fP or \fBspider\fP\&.
769 .UNINDENT
770 .UNINDENT
771 .sp
772 \fBmodule\-info loaded\fP modulefile
773 .INDENT 7.0
774 .INDENT 3.5
775 Returns the names of currently loaded modules matching passed \fImodulefile\fP\&.
776 The parameter \fImodulefile\fP might either be a fully qualified \fImodulefile\fP
777 with name and version or just a directory which in case all loaded
778 \fImodulefiles\fP from the directory will be returned. The parameter
779 \fImodulefile\fP may also be a symbolic modulefile name or a modulefile alias.
780 .sp
781 This command only returns the name and version of designated loaded module.
782 The defined variants of the loaded module are not included in the returned
783 string.
784 .UNINDENT
785 .UNINDENT
786 .sp
787 \fBmodule\-info mode\fP [modetype]
788 .INDENT 7.0
789 .INDENT 3.5
790 Returns the current \fBmodulecmd.tcl\fP\(aqs mode as a string if no
791 \fImodetype\fP is given.
792 .sp
793 Returns \fB1\fP if \fBmodulecmd.tcl\fP\(aqs mode is \fImodetype\fP\&. \fImodetype\fP can
794 be: \fBload\fP, \fBunload\fP, \fBremove\fP (alias of \fBunload\fP), \fBswitch\fP,
795 \fBrefresh\fP, \fBnonpersist\fP (alias of \fBrefresh\fP), \fBdisplay\fP, \fBhelp\fP,
796 \fBtest\fP, \fBwhatis\fP or \fBscan\fP\&.
797 .UNINDENT
798 .UNINDENT
799 .sp
800 \fBmodule\-info name\fP
801 .INDENT 7.0
802 .INDENT 3.5
803 Return the name of the \fImodulefile\fP\&. This is not the full pathname for
804 \fImodulefile\fP\&. See the Modules Variables section for information on the
805 full pathname.
806 .sp
807 This command only returns the name and version of currently evaluating
808 \fImodulefile\fP\&. The defined variants are not included in the returned string.
809 See \fBgetvariant\fP command or \fBModuleVariant\fP array variable to
810 get defined variant values for currently evaluating \fImodulefile\fP\&.
811 .UNINDENT
812 .UNINDENT
813 .sp
814 \fBmodule\-info shell\fP [shellname]
815 .INDENT 7.0
816 .INDENT 3.5
817 Return the current shell under which \fBmodulecmd.tcl\fP was invoked if
818 no \fIshellname\fP is given. The current shell is the first parameter of
819 \fBmodulecmd.tcl\fP, which is normally hidden by the \fBmodule\fP
820 alias.
821 .sp
822 If a \fIshellname\fP is given, returns \fB1\fP if \fBmodulecmd.tcl\fP\(aqs current
823 shell is \fIshellname\fP, returns \fB0\fP otherwise. \fIshellname\fP can be: \fBsh\fP,
824 \fBbash\fP, \fBksh\fP, \fBzsh\fP, \fBcsh\fP, \fBtcsh\fP, \fBfish\fP, \fBcmd\fP, \fBpwsh\fP,
825 \fBtcl\fP, \fBperl\fP, \fBpython\fP, \fBruby\fP, \fBlisp\fP, \fBcmake\fP, \fBr\fP\&.
826 .UNINDENT
827 .UNINDENT
828 .sp
829 \fBmodule\-info shelltype\fP [shelltypename]
830 .INDENT 7.0
831 .INDENT 3.5
832 Return the family of the shell under which \fImodulefile\fP was invoked if no
833 \fIshelltypename\fP is given. As of \fBmodule\-info shell\fP this
834 depends on the first parameter of \fBmodulecmd.tcl\fP\&. The output reflects
835 a shell type determining the shell syntax of the commands produced by
836 \fBmodulecmd.tcl\fP\&.
837 .sp
838 If a \fIshelltypename\fP is given, returns \fB1\fP if \fBmodulecmd.tcl\fP\(aqs
839 current shell type is \fIshelltypename\fP, returns \fB0\fP otherwise.
840 \fIshelltypename\fP can be: \fBsh\fP, \fBcsh\fP, \fBfish\fP, \fBcmd\fP, \fBpwsh\fP,
841 \fBtcl\fP, \fBperl\fP, \fBpython\fP, \fBruby\fP, \fBlisp\fP, \fBcmake\fP, \fBr\fP\&.
842 .UNINDENT
843 .UNINDENT
844 .sp
845 \fBmodule\-info specified\fP
846 .INDENT 7.0
847 .INDENT 3.5
848 Return the module designation (name, version and variants) specified that
849 led to current \fImodulefile\fP evaluation.
850 .UNINDENT
851 .UNINDENT
852 .sp
853 \fBmodule\-info symbols\fP modulefile
854 .INDENT 7.0
855 .INDENT 3.5
856 Returns a list of all symbolic versions assigned to the passed
857 \fImodulefile\fP\&. The parameter \fImodulefile\fP might either be a full qualified
858 \fImodulefile\fP with name and version, another symbolic \fImodulefile\fP name
859 or a \fImodulefile\fP alias.
860 .UNINDENT
861 .UNINDENT
862 .sp
863 \fBmodule\-info tags\fP [tag]
864 .INDENT 7.0
865 .INDENT 3.5
866 Returns all tags assigned to currently evaluated \fImodulefile\fP as a list of
867 strings if no \fItag\fP name is given (see Module tags \%<#\:module-tags> section in
868 module \%<#\:module-1>)
869 .sp
870 When tags are assigned to specific module variants, they are returned only
871 if this variant is the one currently evaluated.
872 .sp
873 Returns \fB1\fP if one of the tags applying to currently evaluated
874 \fImodulefile\fP is \fItag\fP\&. Returns \fB0\fP otherwise.
875 .UNINDENT
876 .UNINDENT
877 .sp
878 \fBmodule\-info type\fP
879 .INDENT 7.0
880 .INDENT 3.5
881 Returns either \fBC\fP or \fBTcl\fP to indicate which \fBmodule\fP command
882 is being executed, either the C version or the Tcl\-only version, to allow
883 the \fImodulefile\fP writer to handle any differences between the two.
884 .UNINDENT
885 .UNINDENT
886 .sp
887 \fBmodule\-info usergroups\fP [name]
888 .INDENT 7.0
889 .INDENT 3.5
890 Returns all the groups the user currently running \fBmodulecmd.tcl\fP is
891 member of as a list of strings if no \fIname\fP is given.
892 .sp
893 Returns \fB1\fP if one of the group current user running \fBmodulecmd.tcl\fP
894 is member of is \fIname\fP\&. Returns \fB0\fP otherwise.
895 .sp
896 If the Modules Tcl extension library is disabled, the \fBid(1)\fP
897 command is invoked to fetch groups of current user.
898 .UNINDENT
899 .UNINDENT
900 .sp
901 \fBmodule\-info username\fP [name]
902 .INDENT 7.0
903 .INDENT 3.5
904 Returns the username of the user currently running \fBmodulecmd.tcl\fP as
905 a string if no \fIname\fP is given.
906 .sp
907 Returns \fB1\fP if username of current user running \fBmodulecmd.tcl\fP is
908 \fIname\fP\&. Returns \fB0\fP otherwise.
909 .sp
910 If the Modules Tcl extension library is disabled, the \fBid(1)\fP
911 command is invoked to fetch username of current user.
912 .UNINDENT
913 .UNINDENT
914 .sp
915 \fBmodule\-info version\fP modulefile
916 .INDENT 7.0
917 .INDENT 3.5
918 Returns the physical module name and version of the passed symbolic
919 version \fImodulefile\fP\&. The parameter \fImodulefile\fP might either be a full
920 qualified \fImodulefile\fP with name and version, another symbolic \fImodulefile\fP
921 name or a \fImodulefile\fP alias.
922 .UNINDENT
923 .UNINDENT
924 .UNINDENT
925 .INDENT 0.0
926 .TP
927 .B module\-tag [options] tag modulefile...
928 Associate \fItag\fP to designated \fImodulefile\fP\&. This tag information will be
929 reported along \fImodulefile\fP on \fBavail\fP \%<#\:subcmd-avail>, \fBlist\fP \%<#\:subcmd-list> and
930 \fBspider\fP \%<#\:subcmd-spider> sub\-commands (see Module tags \%<#\:module-tags> section in
931 module \%<#\:module-1>). Tag information can be queried during \fImodulefile\fP
932 evaluation with the \fBmodule\-info tags\fP modulefile
933 command. \fBmodule\-tag\fP commands should be placed in one of the
934 \fBmodulecmd.tcl\fP rc files.
935 .sp
936 \fBmodule\-tag\fP command accepts the following options:
937 .INDENT 7.0
938 .IP \(bu 2
939 \fB\-\-not\-user {user...}\fP
940 .IP \(bu 2
941 \fB\-\-not\-group {group...}\fP
942 .IP \(bu 2
943 \fB\-\-user {user...}\fP
944 .IP \(bu 2
945 \fB\-\-group {group...}\fP
946 .UNINDENT
947 .sp
948 If \fB\-\-not\-user\fP option is set, the tag is not applied if the username of
949 the user currently running \fBmodulecmd.tcl\fP is part of the list of
950 username specified. Following the same approach, if \fB\-\-not\-group\fP option is
951 set, the tag is not applied if current user is member of one of the groups
952 specified. When both options are set, the tag is not applied if a match is
953 found for \fB\-\-not\-user\fP or \fB\-\-not\-group\fP\&.
954 .sp
955 If \fB\-\-user\fP option is set, the tag is applied only if the username of the
956 user currently running \fBmodulecmd.tcl\fP is part of the list of username
957 specified. Following the same approach, if \fB\-\-group\fP option is set, the tag
958 is applied only if current user is member of one of the groups specified.
959 When both options are set, the tag is applied if a match is found for
960 \fB\-\-user\fP or \fB\-\-group\fP\&. If the same user name is set on both \fB\-\-user\fP
961 and \fB\-\-not\-user\fP options, \fB\-\-user\fP prevails over \fB\-\-not\-user\fP\&. If the
962 same group name is set on both \fB\-\-group\fP and \fB\-\-not\-group\fP, \fB\-\-group\fP
963 prevails over \fB\-\-not\-group\fP\&.
964 .sp
965 The parameter \fImodulefile\fP may also be a symbolic modulefile name or a
966 modulefile alias. It may also leverage a specific syntax to finely select
967 module version (see Advanced module version specifiers section below).
968 Moreover it may also be a full path file name to precisely designate one
969 module in a specific modulepath.
970 .sp
971 Tags inherited from other modulefile commands or module states cannot be set
972 with \fBmodule\-tag\fP\&. Otherwise an error is returned. Those special tags
973 are: \fBauto\-loaded\fP, \fBforbidden\fP, \fBhidden\fP, \fBhidden\-loaded\fP,
974 \fBloaded\fP, \fBnearly\-forbidden\fP and \fBwarning\fP\&.
975 .sp
976 When \fItag\fP equals \fBsticky\fP or \fBsuper\-sticky\fP, designated \fImodulefile\fP is
977 defined Sticky modules \%<#\:sticky-modules>\&.
978 .sp
979 When \fItag\fP equals \fBkeep\-loaded\fP, designated \fImodulefile\fP is not
980 automatically unloaded when it has been auto\-loaded and its dependent modules
981 are getting unloaded.
982 .UNINDENT
983 .INDENT 0.0
984 .TP
985 .B module\-version modulefile version\-name...
986 Assigns the symbolic \fIversion\-name\fP to the \fImodulefile\fP\&. This command
987 should be placed in one of the \fBmodulecmd.tcl\fP rc files in order to
988 provide shorthand invocations of frequently used \fImodulefile\fP names.
989 .sp
990 The special \fIversion\-name\fP default specifies the default version to be
991 used for module commands, if no specific version is given. This replaces
992 the definitions made in the \fB\&.version\fP file in former
993 \fBmodulecmd.tcl\fP releases.
994 .sp
995 The parameter \fImodulefile\fP may be either
996 .INDENT 7.0
997 .IP \(bu 2
998 a fully or partially qualified \fImodulefile\fP with name / version. If
999 name is \fB\&.\fP (dot) then the current directory name is assumed to be the
1000 module name. (Use this for deep \fImodulefile\fP directories.)
1001 .IP \(bu 2
1002 a symbolic \fImodulefile\fP name
1003 .IP \(bu 2
1004 another \fImodulefile\fP alias
1005 .UNINDENT
1006 .UNINDENT
1007 .INDENT 0.0
1008 .TP
1009 .B module\-virtual name modulefile
1010 Assigns the \fImodulefile\fP to the virtual module \fIname\fP\&. This command should be
1011 placed in rc files in order to define virtual modules.
1012 .sp
1013 A virtual module stands for a module \fIname\fP associated to a \fImodulefile\fP\&. The
1014 modulefile is the script interpreted when loading or unloading the virtual
1015 module which appears or can be found with its virtual name.
1016 .sp
1017 The parameter \fImodulefile\fP corresponds to the relative or absolute file
1018 location of a \fImodulefile\fP\&.
1019 .UNINDENT
1020 .INDENT 0.0
1021 .TP
1022 .B module\-warn [options] \-\-message {text message} modulefile...
1023 Print warning message when evaluating \fImodulefile\fP\&. This command could be
1024 placed in one of the \fBmodulecmd.tcl\fP rc files or within \fImodulefiles\fP\&.
1025 Warning is emitted when \fImodulefile\fP is evaluated in \fBload\fP, \fBdisplay\fP,
1026 \fBtest\fP, \fBhelp\fP\&.
1027 .sp
1028 \fBmodule\-warn\fP command accepts the following options:
1029 .INDENT 7.0
1030 .IP \(bu 2
1031 \fB\-\-after datetime\fP
1032 .IP \(bu 2
1033 \fB\-\-before datetime\fP
1034 .IP \(bu 2
1035 \fB\-\-not\-user {user...}\fP
1036 .IP \(bu 2
1037 \fB\-\-not\-group {group...}\fP
1038 .IP \(bu 2
1039 \fB\-\-user {user...}\fP
1040 .IP \(bu 2
1041 \fB\-\-group {group...}\fP
1042 .UNINDENT
1043 .sp
1044 If \fB\-\-after\fP option is set, warning is only effective after specified date
1045 time. Following the same principle, if \fB\-\-before\fP option is set, warning is
1046 only effective before specified date time. Accepted date time format is
1047 \fBYYYY\-MM\-DD[THH:MM]\fP\&. If no time (\fBHH:MM\fP) is specified, \fB00:00\fP is
1048 assumed. \fB\-\-after\fP and \fB\-\-before\fP options are not supported on Tcl
1049 versions prior to 8.5.
1050 .sp
1051 If \fB\-\-not\-user\fP option is set, warning is not applied if the username of
1052 the user currently running \fBmodulecmd.tcl\fP is part of the list of
1053 username specified. Following the same approach, if \fB\-\-not\-group\fP option is
1054 set, warning is not applied if current user is member of one of the groups
1055 specified. When both options are set, warning is not applied if a match is
1056 found for \fB\-\-not\-user\fP or \fB\-\-not\-group\fP\&.
1057 .sp
1058 If \fB\-\-user\fP option is set, warning is applied only if the username of the
1059 user currently running \fBmodulecmd.tcl\fP is part of the list of username
1060 specified. Following the same approach, if \fB\-\-group\fP option is set, warning
1061 is applied only if current user is member of one of the groups specified.
1062 When both options are set, warning is applied if a match is found for
1063 \fB\-\-user\fP or \fB\-\-group\fP\&. If the same user name is set on both \fB\-\-user\fP
1064 and \fB\-\-not\-user\fP options, \fB\-\-user\fP prevails over \fB\-\-not\-user\fP\&. If the
1065 same group name is set on both \fB\-\-group\fP and \fB\-\-not\-group\fP, \fB\-\-group\fP
1066 prevails over \fB\-\-not\-group\fP\&.
1067 .sp
1068 Modules in warning included in the result of \fBavail\fP \%<#\:subcmd-avail>, \fBlist\fP \%<#\:subcmd-list>
1069 or \fBspider\fP \%<#\:subcmd-spider> sub\-commands are reported with a \fBwarning\fP tag applied
1070 to them. See Module tags \%<#\:module-tags> section in module \%<#\:module-1>\&.
1071 .sp
1072 The parameter \fImodulefile\fP may leverage a specific syntax to finely select
1073 module version (see Advanced module version specifiers section below). It
1074 may also be a full path file name to precisely designate one module in a
1075 specific modulepath.
1076 .UNINDENT
1077 .INDENT 0.0
1078 .TP
1079 .B module\-whatis string
1080 Defines a string which is displayed in case of the invocation of the
1081 \fBmodule whatis\fP \%<#\:subcmd-whatis> command. There may be more than one
1082 \fBmodule\-whatis\fP line in a \fImodulefile\fP\&. This command takes no actions
1083 in case of \fBload\fP \%<#\:subcmd-load>, \fBdisplay\fP \%<#\:subcmd-display>, etc. invocations of
1084 \fBmodulecmd.tcl\fP\&.
1085 .sp
1086 The \fIstring\fP parameter has to be enclosed in double\-quotes if there\(aqs more
1087 than one word specified. Words are defined to be separated by whitespace
1088 characters (space, tab, cr).
1089 .UNINDENT
1090 .INDENT 0.0
1091 .TP
1092 .B modulepath\-label directory label
1093 Assigns \fIlabel\fP string to modulepath \fIdirectory\fP\&. This \fIlabel\fP is used on
1094 \fBavail\fP \%<#\:subcmd-avail>, \fBwhatis\fP \%<#\:subcmd-whatis>, \fBsearch\fP \%<#\:subcmd-search> and \fBspider\fP \%<#\:subcmd-spider>
1095 output to refer to the modulepath.
1096 .sp
1097 The parameter \fIdirectory\fP corresponds to a fully or partially qualified
1098 modulepath. If \fIdirectory\fP is \fB\&.\fP (dot) then the current directory of the
1099 modulerc file defining this command is assumed.
1100 .UNINDENT
1101 .INDENT 0.0
1102 .TP
1103 .B prepend\-path [\-d C|\-\-delim C|\-\-delim=C] [\-\-duplicates] variable value...
1104 Append or prepend \fIvalue\fP to environment \fIvariable\fP\&. The
1105 \fIvariable\fP is a colon, or \fIdelimiter\fP, separated list such as
1106 \fBPATH=directory:directory:directory\fP\&. The default delimiter is a colon
1107 \fB:\fP, but an arbitrary one can be given by the \fB\-\-delim\fP option. For
1108 example a space can be used instead (which will need to be handled in
1109 the Tcl specially by enclosing it in \fB\(dq \(dq\fP or \fB{ }\fP). A space, however,
1110 can not be specified by the \fB\-\-delim=C\fP form.
1111 .sp
1112 A reference counter environment variable is also set to know the number of
1113 times \fIvalue\fP has been added to environment \fIvariable\fP when it is added more
1114 than one time. This reference counter environment variable is named by
1115 prefixing \fIvariable\fP by \fB__MODULES_SHARE_\fP \%<#\:envvar-__MODULES_SHARE_-VAR>\&.
1116 .sp
1117 When \fIvalue\fP is already defined in environment \fIvariable\fP, it is not added
1118 again or moved at the end or at the beginning of \fIvariable\fP\&. Exception is
1119 made when the \fB\-\-duplicates\fP option is set in which case \fIvalue\fP is added
1120 again to \fIvariable\fP\&.
1121 .sp
1122 If the \fIvariable\fP is not set, it is created. When a \fImodulefile\fP is
1123 unloaded, \fBappend\-path\fP and \fBprepend\-path\fP become
1124 \fBremove\-path\fP\&.
1125 .sp
1126 If \fIvalue\fP corresponds to the concatenation of multiple elements separated by
1127 colon, or \fIdelimiter\fP, character, each element is treated separately.
1128 .sp
1129 The provided \fIvalue\fP is used as\-is. If any path resolution is required, it
1130 must be performed within the \fImodulefile\fP itself. Use caution when including
1131 characters with special meanings in the shell context (such as \fB~\fP), as the
1132 shell may expand these paths automatically. This can prevent the
1133 corresponding entries from being properly removed when the \fImodulefile\fP is
1134 unloaded.
1135 .sp
1136 If the \fIvariable\fP is \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH> and \fBrequire_via\fP \%<#\:mconfig-require_via>
1137 configuration option is activated, the \fImodulefile\fP is considered a
1138 dependency by the loaded modulefiles stored in the added modulepaths.
1139 .UNINDENT
1140 .INDENT 0.0
1141 .TP
1142 .B prereq [options] modulefile...
1143 \fBprereq\fP controls whether or not the \fImodulefile\fP will be loaded. The
1144 \fBprereq\fP command lists \fImodulefiles\fP which must have been previously
1145 loaded before the current \fImodulefile\fP will be loaded. If a list contains
1146 more than one \fImodulefile\fP, then each member of the list acts as a Boolean OR
1147 operation. Multiple \fBprereq\fP commands may be used to create a Boolean
1148 AND operation. If one of the requirements have not been satisfied, an error
1149 is reported and the current \fImodulefile\fP makes no changes to the user\(aqs
1150 environment.
1151 .sp
1152 If an argument for \fBprereq\fP is a directory and any \fImodulefile\fP from
1153 the directory has been loaded, then the prerequisite is met. For example,
1154 specifying X11 as a \fBprereq\fP means that any version of X11, X11/R4 or
1155 X11/R5, must be loaded before proceeding.
1156 .sp
1157 The parameter \fImodulefile\fP may also be a symbolic modulefile name or a
1158 modulefile alias. It may also leverage a specific syntax to finely select
1159 module version (see Advanced module version specifiers section below).
1160 .sp
1161 \fBprereq\fP command accepts the following options:
1162 .INDENT 7.0
1163 .IP \(bu 2
1164 \fB\-\-modulepath modulepathlist\fP
1165 .IP \(bu 2
1166 \fB\-\-optional\fP
1167 .IP \(bu 2
1168 \fB\-\-tag taglist\fP
1169 .UNINDENT
1170 .sp
1171 When the \fB\-\-optional\fP option is set, the whole list of specified
1172 \fImodulefiles\fP is declared as an optional requirement list. Evaluation is not
1173 stopped if no \fImodulefile\fP from the list is loaded.
1174 .sp
1175 If the \fBauto_handling\fP \%<#\:mconfig-auto_handling> configuration option is enabled
1176 \fBprereq\fP will attempt to load specified modulefile if not found loaded
1177 yet (see Automated module handling mechanisms \%<#\:modules-auto-handling>
1178 in module \%<#\:module-1>).
1179 .sp
1180 The \fB\-\-tag\fP option accepts a list of module tags to apply to \fImodulefile\fP
1181 once loaded. \fItaglist\fP corresponds to the concatenation of multiple tags
1182 separated by colon character. \fItaglist\fP should not contain tags inherited
1183 from \fImodulefile\fP state or from other modulefile commands. If module is
1184 already loaded, tags from \fItaglist\fP are added to the list of tags already
1185 applied to this module.
1186 .sp
1187 The \fB\-\-modulepath\fP option accepts a list of modulepath. \fImodulepathlist\fP
1188 corresponds to the concatenation of multiple modulepaths separated by colon
1189 character. When this option is set, required \fImodulefile\fP should be located
1190 within one of the listed modulepaths. A path in this list may correspond to
1191 the first path elements of an actual modulepath (e.g., \fB/path/to\fP will
1192 match modulefiles located into the \fB/path/to/modulefiles\fP modulepath
1193 directory).
1194 .sp
1195 If an attempt to load \fImodulefile\fP is performed and \fB\-\-modulepath\fP option
1196 is set, \fImodulefile\fP will be searched in the enabled modulepaths whose start
1197 match one of the specified paths and in the specified paths not matching any
1198 enabled modulepaths. For instance if this option is set to
1199 \fB/path/to:/another/path\fP and \fB/path/to/modulefiles\fP is currently the sole
1200 enabled modulepath, \fImodulefile\fP will be searched into
1201 \fB/path/to/modulefiles\fP and \fB/another/path\fP directories.
1202 .UNINDENT
1203 .INDENT 0.0
1204 .TP
1205 .B prereq\-all [options] modulefile...
1206 Declare \fImodulefile\fP as a requirement of currently loading module. This
1207 command acts as an alias of \fBprereq\fP command. If more than one
1208 \fImodulefile\fP are specified, then this list acts as a Boolean AND operation,
1209 which means all specified \fImodulefiles\fP are required.
1210 .sp
1211 \fBprereq\-all\fP command accepts the following options:
1212 .INDENT 7.0
1213 .IP \(bu 2
1214 \fB\-\-modulepath modulepathlist\fP
1215 .IP \(bu 2
1216 \fB\-\-optional\fP
1217 .IP \(bu 2
1218 \fB\-\-tag taglist\fP
1219 .UNINDENT
1220 .sp
1221 When the \fB\-\-optional\fP option is set, each specified \fImodulefile\fP is
1222 declared as an optional requirement. A \fImodulefile\fP that cannot be loaded,
1223 will not stop the evaluation.
1224 .UNINDENT
1225 .INDENT 0.0
1226 .TP
1227 .B prereq\-any [options] modulefile...
1228 Alias of \fBprereq\fP command.
1229 .UNINDENT
1230 .INDENT 0.0
1231 .TP
1232 .B provide modulefile...
1233 Define each specified \fImodulefile\fP as a module alias of currently evaluating
1234 module. \fBprovide\fP command helps to declare the additional elements
1235 included in a modulefile.
1236 .sp
1237 The \fBprovide\fP command should be paired with a \fBconflict\fP
1238 command if the specified alias should be uniquely provided in the currently
1239 loaded environment.
1240 .sp
1241 Note: A module alias defined using \fBprovide\fP command will not be
1242 recognized during module resolution. It is recommended to use the
1243 \fBmodule\-alias\fP command to define an alias that points to the default
1244 resolution target.
1245 .UNINDENT
1246 .INDENT 0.0
1247 .TP
1248 .B pushenv variable value
1249 Set environment \fIvariable\fP to \fIvalue\fP and save previous value of \fIvariable\fP
1250 to restore it when \fImodulefile\fP is unloaded. Like for \fBsetenv\fP
1251 modulefile command, changes made to \fIvariable\fP with \fBpushenv\fP are
1252 applied to \fIvariable\fP in Tcl\(aqs \fBenv\fP array to update environment \fIvariable\fP
1253 value in current evaluation context.
1254 .sp
1255 When \fImodulefile\fP is unloaded, the \fIvalue\fP saved from the \fBpushenv\fP
1256 command of this modulefile is removed from saved value stack list. \fIvariable\fP
1257 is then set to the remaining \fIvalue\fP on top of the stack or it is unset if
1258 stack becomes empty.
1259 .sp
1260 Saved value stack list for \fIvariable\fP is stored in an environment variable
1261 which is named by prefixing \fIvariable\fP by \fB__MODULES_PUSHENV_\fP \%<#\:envvar-__MODULES_PUSHENV_-VAR>\&.
1262 .UNINDENT
1263 .INDENT 0.0
1264 .TP
1265 .B puts [\-nonewline] [channelId] string
1266 Writes the characters given by \fIstring\fP to the channel given by \fIchannelId\fP\&.
1267 This command is part of the regular set of Tcl commands but it is enhanced
1268 with specific features in the modulefile evaluation context. See the
1269 \fBputs(n)\fP Tcl man page for the basic description of this command.
1270 Specific features for modulefile evaluation context are described in the
1271 remainder of this section.
1272 .sp
1273 Content written to the \fBstderr\fP channel is rendered as output message
1274 produced by modulefile. Content written to the \fBstdout\fP channel is rendered
1275 as shell command evaluated in the user current shell environment. Content
1276 sent to \fBstdout\fP is spooled to be rendered after the environment changes
1277 made by modulefile.
1278 .sp
1279 When \fIchannelId\fP equals \fBprestdout\fP, content is rendered as shell command
1280 evaluated in current shell environment. This content is spooled and rendered
1281 prior any other environment changes.
1282 .sp
1283 When \fIchannelId\fP equals \fBlog\fP, content is sent to the log system through
1284 the defined \fBlogger\fP \%<#\:mconfig-logger> command.
1285 .UNINDENT
1286 .INDENT 0.0
1287 .TP
1288 .B remove\-path [options] variable value... [\-\-append\-on\-unload|\-\-prepend\-on\-unload value...]
1289 Remove \fIvalue\fP from the colon, or \fIdelimiter\fP, separated list in
1290 \fIvariable\fP\&.
1291 .sp
1292 \fBremove\-path\fP command accepts the following options:
1293 .INDENT 7.0
1294 .IP \(bu 2
1295 \fB\-d C|\-\-delim C|\-\-delim=C\fP
1296 .IP \(bu 2
1297 \fB\-\-index\fP
1298 .IP \(bu 2
1299 \fB\-\-glob\fP
1300 .IP \(bu 2
1301 \fB\-\-remove\-on\-unload|\-\-noop\-on\-unload|\-\-append\-on\-unload|\-\-prepend\-on\-unload\fP
1302 .UNINDENT
1303 .sp
1304 See \fBprepend\-path\fP or \fBappend\-path\fP for further
1305 explanation of using an arbitrary delimiter. Every string between colons, or
1306 delimiters, in \fIvariable\fP is compared to \fIvalue\fP\&. If the two match, \fIvalue\fP
1307 is removed from \fIvariable\fP if its reference counter is equal to 1 or unknown.
1308 .sp
1309 When \fB\-\-index\fP option is set, \fIvalue\fP refers to an index in \fIvariable\fP
1310 list. The string element pointed by this index is set for removal.
1311 .sp
1312 When \fB\-\-glob\fP option is set, \fIvalue\fP refers to a glob\-style pattern which
1313 is matched against values in \fIvariable\fP to find those to remove. \fB*\fP
1314 character in \fIvalue\fP matches any sequence of characters, including a null
1315 string. \fB?\fP character in \fIvalue\fP matches any single character. See
1316 \fBstring(n)\fP Tcl command for the full list of special characters.
1317 .sp
1318 When \fImodulefile\fP is unloaded, no operation is performed by default or if the
1319 \fB\-\-noop\-on\-unload\fP option is set. If the \fB\-\-remove\-on\-unload\fP option is
1320 set, \fIvalue\fP is removed. If the \fB\-\-append\-on\-unload\fP option is set, append
1321 back \fIvalue\fP removed at load time or specific \fIvalue\fP if any set. If the
1322 \fB\-\-prepend\-on\-unload\fP option is set, prepend back \fIvalue\fP removed at load
1323 time or specific \fIvalue\fP if any set. These options cannot be set if
1324 \fB\-\-index\fP option is also set. The \fB\-\-append\-on\-unload\fP and
1325 \fB\-\-prepend\-on\-unload\fP options cannot be set if \fB\-\-glob\fP option is also
1326 set.
1327 .sp
1328 Reference counter of \fIvalue\fP in \fIvariable\fP denotes the number of times
1329 \fIvalue\fP has been added to \fIvariable\fP\&. This information is stored in
1330 environment \fB__MODULES_SHARE_variable\fP \%<#\:envvar-__MODULES_SHARE_-VAR>\&. When
1331 attempting to remove \fIvalue\fP from \fIvariable\fP, relative reference counter is
1332 checked and \fIvalue\fP is removed only if counter is equal to 1 or not defined.
1333 Otherwise \fIvalue\fP is kept in \fIvariable\fP and reference counter is decreased by
1334 1. If counter equals 1 after being decreased, \fIvalue\fP and its counter are
1335 removed from reference counter variable.
1336 .sp
1337 If \fIvalue\fP corresponds to the concatenation of multiple elements separated by
1338 colon, or \fIdelimiter\fP, character, each element is treated separately.
1339 .sp
1340 An error is raised if \fIvalue\fP equals \fIdelimiter\fP character.
1341 .UNINDENT
1342 .INDENT 0.0
1343 .TP
1344 .B report string
1345 Output \fIstring\fP as a message during \fImodulefile\fP evaluation.
1346 .UNINDENT
1347 .INDENT 0.0
1348 .TP
1349 .B reportError string
1350 Output \fIstring\fP as an error message during \fImodulefile\fP evaluation and raise
1351 error count. \fBreportError\fP does not abort modulefile evaluation. Use
1352 the \fBerror(n)\fP Tcl command to abort evaluation in addition to emit
1353 an error message.
1354 .UNINDENT
1355 .INDENT 0.0
1356 .TP
1357 .B reportWarning string
1358 Output \fIstring\fP as a warning message during \fImodulefile\fP evaluation.
1359 .UNINDENT
1360 .INDENT 0.0
1361 .TP
1362 .B require\-fullname
1363 Abort \fIload\fP evaluation of \fImodulefile\fP if name specified to designate it is
1364 not the fully qualified one. Module alias or a symbolic version names are
1365 considered fully qualified names, exception made for the \fIdefault\fP symbol.
1366 .UNINDENT
1367 .INDENT 0.0
1368 .TP
1369 .B set\-alias alias\-name alias\-string
1370 Sets an alias with the name \fIalias\-name\fP in the user\(aqs environment to the
1371 string \fIalias\-string\fP\&. For some shells, aliases are not possible and the
1372 command has no effect (see Shell support section). When a \fImodulefile\fP is
1373 unloaded, \fBset\-alias\fP becomes \fBunset\-alias\fP\&.
1374 .UNINDENT
1375 .INDENT 0.0
1376 .TP
1377 .B set\-function function\-name function\-string
1378 Creates a function with the name \fIfunction\-name\fP in the user\(aqs environment
1379 with the function body \fIfunction\-string\fP\&. For some shells, functions are not
1380 possible and the command has no effect (see Shell support section). When a
1381 \fImodulefile\fP is unloaded, \fBset\-function\fP becomes
1382 \fBunset\-function\fP\&.
1383 .UNINDENT
1384 .INDENT 0.0
1385 .TP
1386 .B setenv [\-\-set\-if\-undef] variable value
1387 Set environment \fIvariable\fP to \fIvalue\fP\&. The \fBsetenv\fP command will also
1388 change the process\(aq environment. A reference using Tcl\(aqs env associative
1389 array will reference changes made with the \fBsetenv\fP command. Changes
1390 made using Tcl\(aqs \fBenv\fP associative array will \fBNOT\fP change the user\(aqs
1391 environment \fIvariable\fP like the \fBsetenv\fP command. An environment
1392 change made this way will only affect the module parsing process. The
1393 \fBsetenv\fP command is also useful for changing the environment prior to
1394 the \fBexec\fP or \fBsystem\fP command. When a \fImodulefile\fP is unloaded,
1395 \fBsetenv\fP becomes \fBunsetenv\fP\&. If the environment \fIvariable\fP had
1396 been defined it will be overwritten while loading the \fImodulefile\fP\&. A
1397 subsequent \fBunload\fP \%<#\:subcmd-unload> will unset the environment \fIvariable\fP \- the
1398 previous value cannot be restored! (Unless you handle it explicitly or if you
1399 use the \fBpushenv\fP modulefile command instead of \fBsetenv\fP)
1400 .sp
1401 When the \fB\-\-set\-if\-undef\fP option is set, environment variable is defined
1402 when \fImodulefile\fP is loaded only if not yet defined.
1403 .sp
1404 Any newline character in \fIvalue\fP is chopped if using \fIcsh\fP or \fItcsh\fP shells.
1405 .UNINDENT
1406 .INDENT 0.0
1407 .TP
1408 .B source\-sh [\-\-ignore eltlist] shell script [arg...]
1409 Evaluate with \fIshell\fP the designated \fIscript\fP with defined \fIarguments\fP to
1410 find out the environment changes it does. Those changes obtained by comparing
1411 environment prior and after \fIscript\fP evaluation are then translated into
1412 corresponding \fImodulefile\fP commands, which are then applied during modulefile
1413 evaluation as if they were directly written in it.
1414 .sp
1415 When modulefile is unloaded, environment changes done are reserved by
1416 evaluating in the \fBunload\fP context the resulting modulefile commands, which
1417 were recorded in the \fB__MODULES_LMSOURCESH\fP \%<#\:envvar-__MODULES_LMSOURCESH> environment variable at
1418 \fBload\fP time.
1419 .sp
1420 Changes on environment variables, shell aliases, shell functions, shell
1421 completions and current working directory are tracked.
1422 .sp
1423 Changes made on environment variable intended for Modules private use (e.g.,
1424 \fBLOADEDMODULES\fP \%<#\:envvar-LOADEDMODULES>, \fB_LMFILES_\fP \%<#\:envvar-_LMFILES_>, \fB__MODULES_*\fP) are ignored.
1425 .sp
1426 \fIShell\fP could be specified as a command name or a fully qualified pathname.
1427 The following shells are supported: sh, dash, csh, tcsh, bash, ksh, ksh93,
1428 zsh and fish.
1429 .sp
1430 \fIShell\fP could also be set to \fBbash\-eval\fP\&. In this mode, bash shell \fIscript\fP
1431 is not sourced but the output resulting from its execution is evaluated to
1432 determine the environment changes it does.
1433 .sp
1434 The \fB\-\-ignore\fP option accepts a list of shell elements whose changes made
1435 by \fIscript\fP should be ignored. \fIeltlist\fP corresponds to the concatenation of
1436 multiple shell element separated by colon character. Accepted shell elements
1437 are: \fBenvvar\fP, \fBalias\fP, \fBfunction\fP, \fBchdir\fP and \fBcomplete\fP\&.
1438 .UNINDENT
1439 .INDENT 0.0
1440 .TP
1441 .B system string
1442 Run \fIstring\fP command through shell. On Unix, command is passed to the
1443 \fB/bin/sh\fP shell whereas on Windows it is passed to \fBcmd.exe\fP\&.
1444 \fBmodulecmd.tcl\fP redirects stdout to stderr since stdout would be parsed
1445 by the evaluating shell. The exit status of the executed command is returned.
1446 .UNINDENT
1447 .INDENT 0.0
1448 .TP
1449 .B uname field
1450 Provide lookup of system information. Most \fIfield\fP information are retrieved
1451 from the \fBtcl_platform\fP array (see the \fBtclvars(n)\fP man page).
1452 Uname will return the string \fBunknown\fP if information is unavailable for
1453 the \fIfield\fP\&.
1454 .sp
1455 \fBuname\fP will invoke the \fBuname(1)\fP command in order to get
1456 the operating system version and \fBdomainname(1)\fP to figure out the
1457 name of the domain.
1458 .sp
1459 \fIfield\fP values are:
1460 .INDENT 7.0
1461 .IP \(bu 2
1462 \fBsysname\fP: the operating system name
1463 .IP \(bu 2
1464 \fBnodename\fP: the hostname
1465 .IP \(bu 2
1466 \fBdomain\fP: the name of the domain
1467 .IP \(bu 2
1468 \fBrelease\fP: the operating system release
1469 .IP \(bu 2
1470 \fBversion\fP: the operating system version
1471 .IP \(bu 2
1472 \fBmachine\fP: a standard name that identifies the system\(aqs hardware
1473 .UNINDENT
1474 .UNINDENT
1475 .INDENT 0.0
1476 .TP
1477 .B uncomplete name
1478 Unsets completion for command \fIname\fP in the user\(aqs environment. When a
1479 \fImodulefile\fP is unloaded, no operation is performed.
1480 .sp
1481 The following shells are supported: bash, tcsh and fish.
1482 .UNINDENT
1483 .INDENT 0.0
1484 .TP
1485 .B unset\-alias alias\-name
1486 Unsets an alias with the name \fIalias\-name\fP in the user\(aqs environment.
1487 .UNINDENT
1488 .INDENT 0.0
1489 .TP
1490 .B unset\-function function\-name
1491 Removes a function with the name \fIfunction\-name\fP from the user\(aqs environment.
1492 .UNINDENT
1493 .INDENT 0.0
1494 .TP
1495 .B unsetenv [options] variable [value]
1496 Unsets environment \fIvariable\fP\&. When a \fImodulefile\fP is unloaded, no operation
1497 is performed unless if an optional \fIvalue\fP is defined, in which case
1498 \fIvariable\fP is set to \fIvalue\fP\&. The \fBunsetenv\fP command changes the
1499 process\(aq environment like \fBsetenv\fP\&.
1500 .sp
1501 If the \fB\-\-noop\-on\-unload\fP option is set, no operation is performed when
1502 \fImodulefile\fP is unloaded. If the \fB\-\-unset\-on\-unload\fP option is set,
1503 environment \fIvariable\fP is also unset when \fImodulefile\fP is unloaded. These
1504 behaviors are applied even if an optional \fIvalue\fP is defined.
1505 .UNINDENT
1506 .INDENT 0.0
1507 .TP
1508 .B variant [\-\-boolean] [\-\-default value] name [value...]
1509 Declare module variant \%<#\:module-variants> \fIname\fP with list of accepted
1510 \fIvalue\fP and instantiate it in the \fBModuleVariant\fP array variable.
1511 .sp
1512 Variant\(aqs value is selected through the module designation that leads to the
1513 modulefile evaluation. See Advanced module version specifiers section to
1514 learn how variants could be specified.
1515 .sp
1516 Selected variant value is transmitted to the evaluating modulefile. A value
1517 must be specified for variant \fIname\fP and it must corresponds to a value in
1518 the accepted value list if such list is defined. Otherwise an error is
1519 raised. An exception is made if modulefile is evaluated in \fBdisplay\fP mode:
1520 no error is raised if no value is specified for a given variant and variant
1521 is not instantiated in the \fBModuleVariant\fP array variable. When no
1522 list of accepted value is defined, variant could be set to any value.
1523 .sp
1524 When the \fB\-\-default\fP option is set, variant \fIname\fP is set to the \fIvalue\fP
1525 associated with this option in case no value is specified for variant in
1526 module designation.
1527 .sp
1528 If the \fB\-\-boolean\fP option is set, variant \fIname\fP is defined as a Boolean
1529 variant. No list of accepted value should be defined in this case. All values
1530 recognized as Boolean value in Tcl are accepted (i.e., \fB1\fP, \fBtrue\fP,
1531 \fBt\fP, \fByes\fP, \fBy\fP, \fBon\fP, \fB0\fP, \fBfalse\fP, \fBf\fP, \fBno\fP, \fBn\fP or
1532 \fBoff\fP). Boolean variants are instantiated in \fBModuleVariant\fP using
1533 Tcl canonical form of Boolean value (i.e., \fB0\fP or \fB1\fP).
1534 .sp
1535 A variant which is not defined as a Boolean variant cannot define Boolean
1536 values in its accepted value list, exception made for the \fB0\fP and \fB1\fP
1537 integers. An error is raised otherwise.
1538 .sp
1539 Variant \fIname\fP should only be composed of characters part of the
1540 \fBA\-Za\-z0\-9_\-\fP range. Also, a variant name cannot start with \fB\-\fP (minus)
1541 character and the overall name cannot just be a number. An error is raised
1542 if specified \fIname\fP does not match these rules.
1543 .sp
1544 A variant cannot be named \fBversion\fP\&. An error is raised otherwise.
1545 .UNINDENT
1546 .INDENT 0.0
1547 .TP
1548 .B versioncmp version1 version2
1549 Compare version string \fIversion1\fP against version string \fIversion2\fP\&. Returns
1550 \fB\-1\fP, \fB0\fP or \fB1\fP respectively if \fIversion1\fP is less than, equal to or
1551 greater than \fIversion2\fP\&.
1552 .UNINDENT
1553 .INDENT 0.0
1554 .TP
1555 .B x\-resource [resource\-string|filename]
1556 Merge resources into the X11 resource database. The resources are used to
1557 control look and behavior of X11 applications. The command will attempt
1558 to read resources from \fIfilename\fP\&. If the argument isn\(aqt a valid file
1559 name, then string will be interpreted as a resource. Either \fIfilename\fP
1560 or \fIresource\-string\fP is then passed down to be \fBxrdb(1)\fP command.
1561 .sp
1562 \fImodulefiles\fP that use this command, should in most cases contain one or
1563 more \fBx\-resource\fP lines, each defining one X11 resource. The
1564 \fBDISPLAY\fP environment variable should be properly set and the X11
1565 server should be accessible. If \fBx\-resource\fP can\(aqt manipulate the X11
1566 resource database, the \fImodulefile\fP will exit with an error message.
1567 .sp
1568 Examples:
1569 .sp
1570 \fBx\-resource /u2/staff/leif/.xres/Ileaf\fP
1571 .INDENT 7.0
1572 .INDENT 3.5
1573 The content of the \fIIleaf\fP file is merged into the X11 resource database.
1574 .UNINDENT
1575 .UNINDENT
1576 .sp
1577 \fBx\-resource [glob ~/.xres/ileaf]\fP
1578 .INDENT 7.0
1579 .INDENT 3.5
1580 The Tcl glob function is used to have the \fImodulefile\fP read different
1581 resource files for different users.
1582 .UNINDENT
1583 .UNINDENT
1584 .sp
1585 \fBx\-resource {Ileaf.popup.saveUnder: True}\fP
1586 .INDENT 7.0
1587 .INDENT 3.5
1588 Merge the Ileaf resource into the X11 resource database.
1589 .UNINDENT
1590 .UNINDENT
1591 .UNINDENT
1592 .sp
1593 Modulefiles and run\-command (rc) files are differently interpreted. A limited
1594 number of the Modules specific Tcl commands are available for rc files
1595 interpretation since such files are intended to set parameters for modulefiles
1596 (like defining alias, hiding, tagging, etc) and not to change user
1597 environment. The following table summarizes the different commands available
1598 for each interpretation context.
1599 .TS
1600 box center;
1601 l|l.
1602 T{
1603 Commands available from
1604 modulefile interpretation
1605 T} T{
1606 Commands available from run\-command (rc) file
1607 interpretation
1608 T}
1609 _
1610 T{
1611 All the Modules specific
1612 and standard Tcl commands
1613 T} T{
1614 \fBhide\-modulefile\fP, \fBhide\-version\fP,
1615 \fBis\-loaded\fP, \fBis\-used\fP,
1616 \fBlsb\-release\fP, \fBmodule\-alias\fP,
1617 \fBmodule\-forbid\fP, \fBmodule\-hide\fP,
1618 \fBmodule\-info\fP, \fBmodule\-tag\fP,
1619 \fBmodule\-version\fP, \fBmodule\-virtual\fP,
1620 \fBmodule\-warn\fP, \fBmodulepath\-label\fP,
1621 \fBsystem\fP, \fBuname\fP,
1622 \fBversioncmp\fP and standard Tcl commands
1623 T}
1624 .TE
1625 .sp
1626 \fBNote:\fP
1627 .INDENT 0.0
1628 .INDENT 3.5
1629 Global and user run\-command files are interpreted like modulefiles
1630 and benefit from all Modules specific Tcl commands. However it not advised
1631 to perform environment changes from such files.
1632 .UNINDENT
1633 .UNINDENT
1634 .SH MODULES VARIABLES
1635 .INDENT 0.0
1636 .TP
1637 .B ModulesCurrentModulefile
1638 The \fBModulesCurrentModulefile\fP variable contains the full pathname of
1639 the \fImodulefile\fP being interpreted.
1640 .UNINDENT
1641 .INDENT 0.0
1642 .TP
1643 .B ModulesVersion
1644 The \fBModulesVersion\fP variable can be set in \fB\&.version\fP file to
1645 designate the name of the \fImodulefile\fP version which should be considered
1646 as default in current directory (see Locating Modulefiles section below).
1647 .UNINDENT
1648 .INDENT 0.0
1649 .TP
1650 .B ModuleTool
1651 The \fBModuleTool\fP variable contains the name of the \fImodule\fP
1652 implementation currently in use. The value of this variable is set to
1653 \fBModules\fP for this implementation.
1654 .UNINDENT
1655 .INDENT 0.0
1656 .TP
1657 .B ModuleToolVersion
1658 The \fBModuleToolVersion\fP variable contains the version of the \fImodule\fP
1659 implementation currently in use. The value of this variable is set to
1660 \fB5.6.2\fP for this version of Modules.
1661 .UNINDENT
1662 .INDENT 0.0
1663 .TP
1664 .B ModuleVariant
1665 The \fBModuleVariant\fP array variable contains an element entry for each
1666 defined variant associated to the value of this variant (e.g., the
1667 \fB$ModuleVariant(foo)\fP syntax corresponds to the value of variant \fBfoo\fP if
1668 defined). A Tcl evaluation error is obtained when accessing an undefined
1669 variant in \fBModuleVariant\fP array. Use preferably the
1670 \fBgetvariant\fP command to retrieve a variant value when this variant
1671 state is not known.
1672 .sp
1673 The list of the currently defined variants can be retrieved with
1674 \fB[array names ModuleVariant]\fP Tcl code.
1675 .UNINDENT
1676 .SH LOCATING MODULEFILES
1677 .sp
1678 Every directory in \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH> is searched to find the
1679 \fImodulefile\fP\&. A directory in \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH> can have an arbitrary number
1680 of sub\-directories. If the user names a \fImodulefile\fP to be loaded which
1681 is actually a directory, the directory is opened and a search begins for
1682 an actual \fImodulefile\fP\&. First, \fBmodulecmd.tcl\fP looks for a file with
1683 the name \fB\&.modulerc\fP in the directory. If this file exists, its contents
1684 will be evaluated as if it was a \fImodulefile\fP to be loaded. You may place
1685 \fBmodule\-version\fP, \fBmodule\-alias\fP and \fBmodule\-virtual\fP
1686 commands inside this file.
1687 .sp
1688 Additionally, before seeking for \fB\&.modulerc\fP files in the module
1689 directory, the global modulerc file and the \fB\&.modulerc\fP file found at
1690 the root of the modulepath directory are sourced, too. If a named version
1691 default now exists for the \fImodulefile\fP to be loaded, the assigned
1692 \fImodulefile\fP now will be sourced. Otherwise the file \fB\&.version\fP is
1693 looked up in the module directory.
1694 .sp
1695 If the \fB\&.version\fP file exists, it is opened and interpreted as Tcl code
1696 and takes precedence over a \fB\&.modulerc\fP file in the same directory. If
1697 the Tcl variable \fBModulesVersion\fP is set by the \fB\&.version\fP file,
1698 \fBmodulecmd.tcl\fP will use the name as if it specifies a \fImodulefile\fP in
1699 this directory. This will become the default \fImodulefile\fP in this case.
1700 \fBModulesVersion\fP cannot refer to a \fImodulefile\fP located in a different
1701 directory.
1702 .sp
1703 If \fBModulesVersion\fP is a directory, the search begins anew down that
1704 directory. If the name does not match any files located in the current
1705 directory, the search continues through the remaining directories in
1706 \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH>\&.
1707 .sp
1708 Every \fB\&.version\fP and \fB\&.modulerc\fP file found is interpreted as Tcl
1709 code. The difference is that \fB\&.version\fP only applies to the current
1710 directory, and the \fB\&.modulerc\fP applies to the current directory and all
1711 subdirectories. Changes made in these files will affect the subsequently
1712 interpreted \fImodulefile\fP\&.
1713 .sp
1714 If a \fB\&.modulecache\fP file is found at the root of a modulepath directory,
1715 this file is interpreted as Tcl code to learn all \fB\&.modulerc\fP,
1716 \fB\&.version\fP and modulefiles available. Modulepath content is read from
1717 module cache \%<#\:module-cache> file. Modulepath directory is only walked
1718 through to check if limited access modulefiles or directories are available to
1719 current user.
1720 .sp
1721 If no default version may be figured out, an implicit default is selected when
1722 this behavior is enabled (see \fBMODULES_IMPLICIT_DEFAULT\fP \%<#\:envvar-MODULES_IMPLICIT_DEFAULT> in
1723 module \%<#\:module-1>). If disabled, module names should be fully qualified when no
1724 explicit default is defined for them, otherwise no default version is found
1725 and an error is returned. If enabled, then the highest numerically sorted
1726 \fImodulefile\fP, virtual module or module alias under the directory will be used.
1727 The dictionary comparison method of the \fBlsort(n)\fP Tcl command is
1728 used to achieve this sort. If highest numerically sorted element is an alias,
1729 search continues on its \fImodulefile\fP target.
1730 .sp
1731 For example, it is possible for a user to have a directory named X11 which
1732 simply contains a \fB\&.version\fP file specifying which version of X11 is to
1733 be loaded. Such a file would look like:
1734 .INDENT 0.0
1735 .INDENT 3.5
1736 .sp
1737 .EX
1738 #%Module
1739 set ModulesVersion R4
1740 .EE
1741 .UNINDENT
1742 .UNINDENT
1743 .sp
1744 The equivalent \fB\&.modulerc\fP would look like:
1745 .INDENT 0.0
1746 .INDENT 3.5
1747 .sp
1748 .EX
1749 #%Module
1750 module\-version ./R4 default
1751 .EE
1752 .UNINDENT
1753 .UNINDENT
1754 .sp
1755 If the extended default mechanism is enabled (see
1756 \fBMODULES_EXTENDED_DEFAULT\fP \%<#\:envvar-MODULES_EXTENDED_DEFAULT> in module \%<#\:module-1>) the module version
1757 specified is matched against starting portion of existing module versions,
1758 where portion is a substring separated from the rest of version string by a
1759 \fB\&.\fP character.
1760 .sp
1761 When the implicit default mechanism and the Advanced module version
1762 specifiers are both enabled, a \fBdefault\fP and \fBlatest\fP symbolic versions
1763 are automatically defined for each module name (also at each directory level
1764 in case of deep \fImodulefile\fP). Unless a symbolic version, alias, or regular
1765 module version already exists for these version names.
1766 .sp
1767 Every file in searched directories is checked to see if it begins with the
1768 Modules magic cookie (i.e., \fB#%Module\fP file signature) to determine if it is
1769 a \fImodulefile\fP (see DESCRIPTION section). When the \fBmcookie_check\fP \%<#\:mconfig-mcookie_check>
1770 configuration is set to \fBeval\fP, this check is skipped and all files in
1771 search directories are considered \fImodulefiles\fP\&.
1772 .sp
1773 If user names a \fImodulefile\fP that cannot be found in the first \fImodulepath\fP
1774 directory, \fImodulefile\fP will be searched in next \fImodulepath\fP directory
1775 and so on until a matching \fImodulefile\fP is found. If search goes through
1776 a module alias or a symbolic version, this alias or symbol is resolved by
1777 first looking at the \fImodulefiles\fP in the \fImodulepath\fP where this alias or
1778 symbol is defined. If not found, resolution looks at the other \fImodulepaths\fP
1779 in their definition order.
1780 .sp
1781 When locating \fImodulefiles\fP, if a \fB\&.modulerc\fP, a \fB\&.version\fP, a
1782 directory or a \fImodulefile\fP cannot be read during the search it is simply
1783 ignored with no error message produced. Visibility of \fImodulefiles\fP can thus
1784 be adapted to the rights the user has been granted. Exception is made when
1785 trying to directly access a directory or a \fImodulefile\fP\&. In this case,
1786 the access issue is returned as an error message.
1787 .sp
1788 Depending on their name, their file permissions or the use of specific
1789 modulefile commands, \fImodulefile\fP, virtual module, module alias or symbolic
1790 version may be set hidden which impacts available modules search or module
1791 selection processes (see Hiding modulefiles section below).
1792 .SH HIDING MODULEFILES
1793 .sp
1794 A \fImodulefile\fP, virtual module, module alias or symbolic version whose name or
1795 element in their name starts with a dot character (\fB\&.\fP) or who are targeted
1796 by a \fBmodule\-hide\fP command are considered hidden. Hidden modules are
1797 not displayed or taken into account except if they are explicitly named (e.g.,
1798 \fBfoo/1.2.3\fP or \fBfoo/.2.0\fP not \fBfoo\fP). If module has been hidden with the
1799 \fB\-\-soft\fP option of the \fBmodule\-hide\fP command set, it is not
1800 considered hidden if the root name of the query to search it matches module
1801 root name (e.g., searching \fBfoo\fP will return a \fBfoo/1.2.3\fP modulefile
1802 targeted by a \fBmodule\-hide \-\-soft\fP command). If module has been hidden with
1803 the \fB\-\-hard\fP option of the \fBmodule\-hide\fP command set, it is always
1804 considered hidden thus it is never displayed nor taken into account even if
1805 it is explicitly named.
1806 .sp
1807 A \fImodulefile\fP, virtual module, module alias or symbolic version who are
1808 targeted by a \fBmodule\-hide \-\-hard\fP command and a
1809 \fBmodule\-forbid\fP command or whose file access permissions are restricted
1810 are considered hard\-hidden and forbidden. Such modules are not displayed or
1811 taken into account. When explicitly named for evaluation selection, such
1812 modules are unveiled to return an access error.
1813 .sp
1814 \fBNote:\fP
1815 .INDENT 0.0
1816 .INDENT 3.5
1817 When the \fBmcookie_check\fP \%<#\:mconfig-mcookie_check> configuration is set to \fBeval\fP,
1818 file access permissions are not checked thus files with restricted
1819 permissions are included in search results but still lead to error if
1820 evaluated.
1821 .UNINDENT
1822 .UNINDENT
1823 .sp
1824 A symbolic version\-name assigned to a hidden module is displayed or taken into
1825 account only if explicitly named and if module is not hard\-hidden. Non\-hidden
1826 module alias targeting a hidden \fImodulefile\fP appears like any other non\-hidden
1827 module alias. Finally, a hidden symbolic version targeting a non\-hidden module
1828 is displayed or taken into account only if not hard\-hidden and explicitly
1829 named to refer to its non\-hidden target.
1830 .sp
1831 The automatic version symbols (e.g., \fBdefault\fP and \fBlatest\fP) are
1832 unaffected by hiding. Moreover when a regular \fBdefault\fP or \fBlatest\fP
1833 version is set hidden, the corresponding automatic version symbol takes the
1834 left spot. For instance, if \fBfoo/default\fP which targets \fBfoo/1.2.3\fP is set
1835 hard\-hidden, the \fBdefault\fP automatic version symbol will be set onto
1836 \fBfoo/2.1.3\fP, the highest available version of \fBfoo\fP\&.
1837 .sp
1838 When loading a \fImodulefile\fP or a virtual module targeted by a
1839 \fBmodule\-hide \-\-hidden\-loaded\fP command, this module
1840 inherits the \fBhidden\-loaded\fP tag. Hidden loaded modules are not reported
1841 among \fBlist\fP \%<#\:subcmd-list> sub\-command results.
1842 .sp
1843 If the \fB\-\-all\fP \%<#\:cmdoption-all> option is set on \fBavail\fP \%<#\:subcmd-avail>, \fBaliases\fP \%<#\:subcmd-aliases>,
1844 \fBwhatis\fP \%<#\:subcmd-whatis>, \fBsearch\fP \%<#\:subcmd-search> or \fBspider\fP \%<#\:subcmd-spider> sub\-commands, hidden
1845 modules are taken into account in search. Hard\-hidden modules are unaffected
1846 by this option.
1847 .sp
1848 If the \fB\-\-all\fP \%<#\:cmdoption-all> option is set on \fBlist\fP \%<#\:subcmd-list> sub\-command, hidden
1849 loaded modules are included in result output.
1850 .sp
1851 A behavior equivalent to the use of the \fB\-\-all\fP \%<#\:cmdoption-all> option is obtained on
1852 \fBavail\fP \%<#\:subcmd-avail>, \fBlist\fP \%<#\:subcmd-list> and \fBspider\fP \%<#\:subcmd-spider> sub\-commands by adding
1853 the \fBhidden\fP element to the output configuration option controlling regular
1854 or terse reporting of these sub\-commands: \fBavail_output\fP \%<#\:mconfig-avail_output>,
1855 \fBavail_terse_output\fP \%<#\:mconfig-avail_terse_output>, \fBlist_output\fP \%<#\:mconfig-list_output>,
1856 \fBlist_terse_output\fP \%<#\:mconfig-list_terse_output>, \fBspider_output\fP \%<#\:mconfig-spider_output>,
1857 \fBspider_terse_output\fP \%<#\:mconfig-spider_terse_output>\&.
1858 .SH ADVANCED MODULE VERSION SPECIFIERS
1859 .sp
1860 When the advanced module version specifiers mechanism is enabled (see
1861 \fBMODULES_ADVANCED_VERSION_SPEC\fP \%<#\:envvar-MODULES_ADVANCED_VERSION_SPEC> in module \%<#\:module-1>), the
1862 specification of modulefile passed on Modules specific Tcl commands changes.
1863 After the module name a version constraint and variants may be added.
1864 .SS Version specifiers
1865 .sp
1866 After the module name a version constraint prefixed by the \fB@\fP character may
1867 be added. It could be directly appended to the module name or separated from
1868 it with a space character.
1869 .sp
1870 Constraints can be expressed to refine the selection of module version to:
1871 .INDENT 0.0
1872 .IP \(bu 2
1873 a single version with the \fB@version\fP syntax, for instance \[email protected]\fP
1874 syntax will select module \fBfoo/1.2.3\fP
1875 .IP \(bu 2
1876 a list of versions with the \fB@version1,version2,...\fP syntax, for instance
1877 \[email protected],1.10\fP will match modules \fBfoo/1.2.3\fP and \fBfoo/1.10\fP
1878 .IP \(bu 2
1879 a range of versions with the \fB@version1:\fP, \fB@:version2\fP and
1880 \fB@version1:version2\fP syntaxes, for instance \[email protected]:\fP will select all
1881 versions of module \fBfoo\fP greater than or equal to \fB1.2\fP, \fBfoo@:1.3\fP
1882 will select all versions less than or equal to \fB1.3\fP and \[email protected]:1.3\fP
1883 matches all versions between \fB1.2\fP and \fB1.3\fP including \fB1.2\fP and
1884 \fB1.3\fP versions
1885 .UNINDENT
1886 .sp
1887 Advanced specification of single version or list of versions may benefit from
1888 the activation of the extended default mechanism (see
1889 \fBMODULES_EXTENDED_DEFAULT\fP \%<#\:envvar-MODULES_EXTENDED_DEFAULT> in module \%<#\:module-1>) to use an abbreviated
1890 notation like \fB@1\fP to refer to more precise version numbers like \fB1.2.3\fP\&.
1891 Range of versions on its side natively handles abbreviated versions.
1892 .sp
1893 In order to be specified in a range of versions or compared to a range of
1894 versions, the version major element should corresponds to a number. For
1895 instance \fB10a\fP, \fB1.2.3\fP, \fB1.foo\fP are versions valid for range
1896 comparison whereas \fBdefault\fP or \fBfoo.2\fP versions are invalid for range
1897 comparison.
1898 .sp
1899 Range of versions can be specified in version list, for instance
1900 \fBfoo@:1.2,1.4:1.6,1.8:\fP\&. Such specification helps to exclude specific
1901 versions, like versions \fB1.3\fP and \fB1.7\fP in previous example.
1902 .sp
1903 If the implicit default mechanism is also enabled (see
1904 \fBMODULES_IMPLICIT_DEFAULT\fP \%<#\:envvar-MODULES_IMPLICIT_DEFAULT> in module \%<#\:module-1>), a \fBdefault\fP and
1905 \fBlatest\fP symbolic versions are automatically defined for each module name
1906 (also at each directory level for deep \fImodulefiles\fP). These automatic version
1907 symbols are defined unless a symbolic version, alias, or regular module
1908 version already exists for these \fBdefault\fP or \fBlatest\fP version names.
1909 Using the \fBmod@latest\fP (or \fBmod/latest\fP) syntax ensures highest available
1910 version will be selected.
1911 .SS Variants
1912 .sp
1913 After the module name, variants can be specified. Module variants \%<#\:module-variants> are
1914 alternative evaluation of the same \fImodulefile\fP\&. A variant is specified by
1915 associating a value to its name. This specification is then transmitted to the
1916 evaluating \fImodulefile\fP which instantiates the variant in the
1917 \fBModuleVariant\fP array variable when reaching the \fBvariant\fP
1918 modulefile command declaring this variant.
1919 .sp
1920 Variant can be specified with the \fBname=value\fP syntax where \fIname\fP is the
1921 declared variant name and \fIvalue\fP, the value this variant is set to when
1922 evaluating the \fImodulefile\fP\&.
1923 .sp
1924 Boolean variants can be specified with the \fB+name\fP syntax to set this
1925 variant on and with the \fB\-name\fP or \fB~name\fP syntaxes to set this variant
1926 off. The \fB\-name\fP syntax is not supported on ml \%<#\:ml-1> command as the
1927 minus sign already means to unload designated module. The \fB~name\fP and
1928 \fB+name\fP syntaxes could also be defined appended to another specification
1929 word (e.g., the module name, version or another variant specification),
1930 whereas \fB\-name\fP syntax must be the start of a new specification word.
1931 .sp
1932 Boolean variants may also be specified with the \fBname=value\fP syntax. \fIvalue\fP
1933 should be set to \fB1\fP, \fBtrue\fP, \fBt\fP, \fByes\fP, \fBy\fP or \fBon\fP to enable
1934 the variant or it should be set to \fB0\fP, \fBfalse\fP, \fBf\fP, \fBno\fP, \fBn\fP or
1935 \fBoff\fP to disable the variant.
1936 .sp
1937 Shortcuts may be used to abbreviate variant specification. The
1938 \fBvariant_shortcut\fP \%<#\:mconfig-variant_shortcut> configuration option associates shortcut character
1939 to variant name. With a shortcut defined, variant could be specified with the
1940 \fB<shortcut>value\fP syntax. For instance if character \fB%\fP is set as a
1941 shortcut for variant \fBfoo\fP, the \fB%value\fP syntax is equivalent to the
1942 \fBfoo=value\fP syntax.
1943 .sp
1944 Variant \fIname\fP should only be composed of characters part of the
1945 \fBA\-Za\-z0\-9_\-\fP range. Also, a variant name cannot start with \fB\-\fP (minus)
1946 character and the overall name cannot just be a number.
1947 .sp
1948 Specific characters used in variant specification syntax cannot be used as
1949 part of the name or version of a module. These specific characters are \fB+\fP,
1950 \fB~\fP, \fB=\fP and all characters set as variant shortcut. Exception is made for
1951 \fB+\fP and \fB~\fP characters if string that follows after does not correspond to
1952 a valid variant name (e.g., \fIname+\fP, \fIname++\fP, \fIname/version+1\fP).
1953 .SH DEPENDENCIES BETWEEN MODULEFILES
1954 .sp
1955 A modulefile may express dependencies on other modulefiles. Two kind of
1956 dependency exist: pre\-requirement and conflict. The former means specified
1957 modulefiles should be loaded prior the modulefile that express the
1958 requirement. The latter means specified modulefiles should not be loaded for
1959 the modulefile that express the conflict to be loaded too.
1960 .sp
1961 Pre\-requirement could be expressed with \fBprereq\fP, \fBprereq\-any\fP,
1962 \fBprereq\-all\fP, \fBdepends\-on\fP, \fBdepends\-on\-any\fP,
1963 \fBalways\-load\fP, \fBmodule load\fP,
1964 \fBmodule switch\fP, \fBmodule try\-load\fP or
1965 \fBmodule load\-any\fP modulefile commands. When the
1966 \fBauto_handling\fP \%<#\:mconfig-auto_handling> configuration option is disabled, required modulefile
1967 should be manually loaded prior their dependent modulefile when expressed with
1968 the \fBprereq\fP, \fBprereq\-any\fP, \fBprereq\-all\fP,
1969 \fBdepends\-on\fP or \fBdepends\-on\-any\fP modulefile commands. For other
1970 commands or when \fBauto_handling\fP \%<#\:mconfig-auto_handling> is enabled, pre\-required modulefiles
1971 are automatically loaded.
1972 .sp
1973 Another form of pre\-requirement is expressed through the use of the modulefile
1974 commands \fBmodule use\fP, \fBappend\-path
1975 MODULEPATH\fP, or \fBprepend\-path MODULEPATH\fP,
1976 when the \fBrequire_via\fP \%<#\:mconfig-require_via> configuration option is enabled. In this
1977 context, a modulefile that adds a modulepath is treated as a requirement for
1978 the modulefiles loaded from that path. This pre\-requirement is considered when
1979 such modules are already loaded, helping to maintain consistency when
1980 attempting to unload a modulefile that enables a modulepath.
1981 .sp
1982 Conflict is expressed with \fBconflict\fP, \fBfamily\fP or
1983 \fBmodule unload\fP modulefile commands. When the
1984 \fBauto_handling\fP \%<#\:mconfig-auto_handling> or \fBconflict_unload\fP \%<#\:mconfig-conflict_unload> configuration options
1985 are disabled, a conflicting loaded modulefile should be manually unloaded
1986 prior loading the modulefile that express such conflict when defined with
1987 \fBconflict\fP or \fBfamily\fP\&. It is automatically unloaded when
1988 expressed with \fBmodule unload\fP (unless dependent modulefiles
1989 are loaded) or if \fBauto_handling\fP \%<#\:mconfig-auto_handling> and \fBconflict_unload\fP \%<#\:mconfig-conflict_unload>
1990 options are enabled. An error is raised when trying to load a module that is
1991 already loaded but with a different variant set or coming from a different
1992 modulepath. If both options are enabled the loaded module is automatically
1993 unloaded to satisfy the new set of variant or modulepath asked.
1994 .sp
1995 It is strongly advised to define dependencies prior environment changes in a
1996 modulefile. Dependency resolution should be done before any environment change
1997 to ensure the environment is getting set in the same order whether
1998 pre\-requirements are already loaded, or if they are automatically loaded when
1999 loading the modulefile which depends on them, or if all loaded modules are
2000 reloaded or refreshed. This is especially important when the modulefile
2001 updates an environment variable also altered by other modulefiles like
2002 \fBPATH\fP\&. As the order of the path elements in such variable defines
2003 priority, it is important that this order does not change depending on the way
2004 the modulefiles are loaded.
2005 .sp
2006 \fBmodule\fP keeps environment consistent which means a modulefile cannot
2007 be loaded if its requirements are not loaded or if a conflicting module is
2008 loaded. In addition a loaded module cannot be unloaded if other loaded modules
2009 depends on it. The automated module handling
2010 mechanisms \%<#\:modules-auto-handling> attempt to solve the dependencies expressed
2011 by loading or unloading additional modulefiles. When the \fB\-\-no\-auto\fP \%<#\:cmdoption-no-auto>
2012 option is set on \fBmodule\fP command when loading or unload modulefile,
2013 automated module handling mechanisms are disabled and dependencies have to be
2014 solved manually. When dependencies are not satisfied, modulefile fails to load
2015 or unload.
2016 .sp
2017 Adding the \fB\-\-not\-req\fP option when expressing dependencies in modulefile
2018 with the \fBmodule\fP command will attempt to load or unload the designated
2019 modulefile but it will not mark them as pre\-requirement or conflict.
2020 .sp
2021 Adding the \fB\-\-optional\fP option on \fBprereq\fP, \fBprereq\-any\fP,
2022 \fBprereq\-all\fP, \fBdepends\-on\fP, \fBdepends\-on\-any\fP or
2023 \fBalways\-load\fP modulefile commands declares the pre\-requirement as
2024 optional. If an optional pre\-requirement is not found loaded or cannot be
2025 automatically loaded, the dependency expressed is yet considered satisfied.
2026 When an optional requirement is loaded afterward, the dependent module will
2027 get automatically reloaded if the \fBauto_handling\fP \%<#\:mconfig-auto_handling> configuration
2028 option is enabled.
2029 .sp
2030 By adding the \fB\-\-force\fP \%<#\:cmdoption-force> option to the \fBmodule\fP command when
2031 loading or unloading modulefile, the consistency checks are by\-passed. This
2032 option cannot be used when expressing dependencies in modulefiles. If a module
2033 has been force loaded whereas its requirements are not loaded or whereas a
2034 conflicting module is also loaded, the user environment is said inconsistent.
2035 .sp
2036 Note that a pre\-requirement should be found in the loaded module list prior
2037 its dependent module. User environment is considered inconsistent if
2038 pre\-requirement module is found loaded after dependent module, as the
2039 environment changes may have been done in the wrong priority order.
2040 .sp
2041 When user environment is considered inconsistent global operations achieved by
2042 \fBrefresh\fP \%<#\:subcmd-refresh>, \fBreload\fP \%<#\:subcmd-reload> and \fBsave\fP \%<#\:subcmd-save> sub\-commands cannot
2043 perform. This mechanism is there to avoid the situation to worsen by
2044 re\-evaluating all loaded modules or recording this environment.
2045 .sp
2046 When the \fBauto_handling\fP \%<#\:mconfig-auto_handling> configuration option is enabled, if missing
2047 pre\-requirement modulefile gets loaded or conflicting modulefile gets unloaded
2048 the inconsistent loaded module will be automatically reloaded to make user
2049 environment consistent again.
2050 .SH MODULEFILE SPECIFIC HELP
2051 .sp
2052 Users can request help about a specific \fImodulefile\fP through the
2053 module \%<#\:module-1> command. The \fImodulefile\fP can print helpful information or
2054 start help oriented programs by defining a \fBModulesHelp\fP subroutine. The
2055 subroutine will be called when the \fBmodule help modulefile\fP \%<#\:subcmd-help>
2056 command is used.
2057 .sp
2058 Help text may also be defined within \fImodulefile\fP with \fBmodule\-help\fP
2059 command. Text defined such way is printed before evaluation of \fBModulesHelp\fP
2060 subroutine if any.
2061 .SH MODULEFILE SPECIFIC TEST
2062 .sp
2063 Users can request test of a specific \fImodulefile\fP through the module \%<#\:module-1>
2064 command. The \fImodulefile\fP can perform some sanity checks on its
2065 definition or on its underlying programs by defining a \fBModulesTest\fP
2066 subroutine. The subroutine will be called when the
2067 \fBmodule test modulefile\fP \%<#\:subcmd-test> command is used. The subroutine should
2068 return 1 in case of success. If no or any other value is returned, test is
2069 considered failed.
2070 .SH MODULEFILE DISPLAY
2071 .sp
2072 The \fBmodule display modulefile\fP \%<#\:subcmd-display> command will detail all
2073 changes that will be made to the environment. After displaying all of the
2074 environment changes \fBmodulecmd.tcl\fP will call the \fBModulesDisplay\fP
2075 subroutine. The \fBModulesDisplay\fP subroutine is a good place to put
2076 additional descriptive information about the \fImodulefile\fP\&.
2077 .SH COMPATIBILITY WITH LMOD TCL MODULEFILE
2078 .sp
2079 The \fBmodulecmd.tcl\fP program supports Tcl modulefile or modulerc written
2080 for Lmod, the alternative \fBmodule\fP implementation developed in Lua.
2081 Except for the specific cases listed below, such modulefiles can be evaluated
2082 by Modules without producing errors. Key differences between the two
2083 implementations are outlined below.
2084 .sp
2085 The \fBremove\-property\fP modulefile command is evaluated as a \fIno\-operation\fP
2086 command. No error is obtained if this command is used in modulefiles but no
2087 change occurs.
2088 .sp
2089 The \fBhaveDynamicMPATH\fP is evaluated as a \fIno\-operation\fP modulefile
2090 command. If modulefile conditionally updates \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH> environment
2091 variable, this command is needed to help Lmod know that modulefile changes
2092 \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH>\&. \fBspider\fP \%<#\:subcmd-spider> sub\-command on Modules does not need
2093 this information as modulefile is evaluated in the context of the current
2094 user to determine whether \fBMODULEPATH\fP \%<#\:envvar-MODULEPATH> is updated.
2095 .sp
2096 The \fBbreak\fP command does not accept any argument. A \fBmsg\fP argument
2097 can be set on Lmod to provide a customized break error message.
2098 .sp
2099 The \fBsetenv\fP, \fBunsetenv\fP, \fBprepend\-path\fP,
2100 \fBappend\-path\fP, \fBremove\-path\fP, \fBpushenv\fP and \fBmodule\fP
2101 \fBload\fP, \fBload\-any\fP, \fBtry\-load\fP
2102 and \fBunload\fP modulefile commands do not support the \fB\-\-mode\fP
2103 option. An error is raised if this option is used.
2104 .sp
2105 The \fBsetenv\fP and \fBunsetenv\fP modulefile commands do not support
2106 the \fB\-\-respect\fP option. An error is raised if this option is used.
2107 .sp
2108 Use of \fBreportError\fP command aborts modulefile evaluation on Lmod. This
2109 command only reports an error message on Modules.
2110 .sp
2111 The \fBrequire\-fullname\fP command only aborts \fIload\fP modulefile evaluation
2112 whereas the Lmod implementation also aborts \fIunload\fP and \fIdisplay\fP
2113 evaluations.
2114 .sp
2115 When processing a \fBfamily\fP command, the \fBLMOD_FAMILY_<NAME>\fP
2116 environment variable is also defined to be compatible with modulefiles or
2117 scripts relying on such variable.
2118 .sp
2119 When unloading a modulefile, the \fBpushenv\fP command does not update the
2120 value of the environment variable if this modulefile was not defining the
2121 value currently in use.
2122 .sp
2123 The third optional argument of \fBappend\-path\fP and \fBprepend\-path\fP
2124 commands corresponds to a priority specification on Lmod whereas these two
2125 commands accept multiple path element arguments on Modules.
2126 .sp
2127 The \fBprereq\fP command is equivalent to the \fBprereq\-any\fP command
2128 on Modules whereas on Lmod it is equivalent to the \fBprereq\-all\fP
2129 command.
2130 .sp
2131 If the \fBauto_handling\fP \%<#\:mconfig-auto_handling> configuration option is disabled, the
2132 requirements defined with the \fBdepends\-on\fP or \fBdepends\-on\-any\fP
2133 commands are not automatically loaded and an error is raised if none of these
2134 requirements are found loaded.
2135 .sp
2136 If the \fBauto_handling\fP \%<#\:mconfig-auto_handling> or \fBconflict_unload\fP \%<#\:mconfig-conflict_unload> configuration
2137 options are disabled, the conflicts defined with the \fBfamily\fP command
2138 are not automatically unloaded and an error is raised when trying to load a
2139 module defining a family already defined by a loaded module.
2140 .sp
2141 On \fBmodule load\-any\fP \%<#\:subcmd-load-any> sub\-command and modulefile command, a
2142 modulefile evaluation error is not reported and \fBmodule
2143 load\-any\fP \%<#\:subcmd-load-any> continues to the next modulefile instead of aborting the
2144 whole process. No attempt to load listed modulefiles is made if one of these
2145 modulefiles is found already loaded.
2146 .sp
2147 On \fBmodule try\-load\fP modulefile command, each modulefile
2148 specified is considered an optional pre\-requirement. If it is loaded
2149 afterward and if the \fBauto_handling\fP \%<#\:mconfig-auto_handling> configuration option is enabled,
2150 the dependent module will get automatically reloaded.
2151 .SH SHELL SUPPORT
2152 .sp
2153 The \fBmodulecmd.tcl\fP program that evaluates \fImodulefiles\fP supports a
2154 variety of shells or languages: \fIsh\fP family shells (\fIsh\fP, \fIbash\fP, \fIksh\fP and
2155 \fIzsh\fP), \fIcsh\fP family shells (\fIcsh\fP and \fItcsh\fP), \fIfish\fP, \fIcmd\fP, \fIpwsh\fP,
2156 \fIpython\fP, \fIperl\fP, \fIruby\fP, \fItcl\fP, \fIcmake\fP, \fIr\fP, and \fIlisp\fP\&.
2157 .sp
2158 Modulefiles produce environment changes when evaluated, like defining an
2159 environment variable. The \fBmodulecmd.tcl\fP program outputs the
2160 corresponding code for the selected \(dqshell\(dq. Thereafter this code is evaluated
2161 by the \fBmodule\fP alias or function to update the current environment.
2162 .sp
2163 Depending on the \(dqshell\(dq kind, not all the environment changes that can be
2164 defined in modulefiles are supported. The following table summarizes the
2165 changes that are supported by the shells supported by \fBmodulecmd.tcl\fP\&.
2166 .TS
2167 box center;
2168 l|l|l|l|l|l|l.
2169 T{
2170 T} T{
2171 Environment variables
2172 (\fBsetenv\fP,
2173 \fBunsetenv\fP,
2174 \fBpushenv\fP,
2175 \fBappend\-path\fP,
2176 \fBprepend\-path\fP,
2177 \fBremove\-path\fP)
2178 T} T{
2179 Shell alias
2180 (\fBset\-alias\fP,
2181 \fBunset\-alias\fP)
2182 T} T{
2183 Shell functions
2184 (\fBset\-function\fP,
2185 \fBunset\-function\fP)
2186 T} T{
2187 Command completion
2188 (\fBcomplete\fP,
2189 \fBuncomplete\fP)
2190 T} T{
2191 \fBchdir\fP
2192 T} T{
2193 \fBx\-resource\fP
2194 T}
2195 _
2196 T{
2197 sh
2198 T} T{
2199 x
2200 T} T{
2201 x
2202 T} T{
2203 x
2204 T} T{
2205 T} T{
2206 x
2207 T} T{
2208 x
2209 T}
2210 _
2211 T{
2212 bash
2213 T} T{
2214 x
2215 T} T{
2216 x
2217 T} T{
2218 x
2219 T} T{
2220 x
2221 T} T{
2222 x
2223 T} T{
2224 x
2225 T}
2226 _
2227 T{
2228 ksh
2229 T} T{
2230 x
2231 T} T{
2232 x
2233 T} T{
2234 x
2235 T} T{
2236 T} T{
2237 x
2238 T} T{
2239 x
2240 T}
2241 _
2242 T{
2243 zsh
2244 T} T{
2245 x
2246 T} T{
2247 x
2248 T} T{
2249 x
2250 T} T{
2251 T} T{
2252 x
2253 T} T{
2254 x
2255 T}
2256 _
2257 T{
2258 csh
2259 T} T{
2260 x
2261 T} T{
2262 x
2263 T} T{
2264 T} T{
2265 T} T{
2266 x
2267 T} T{
2268 x
2269 T}
2270 _
2271 T{
2272 tcsh
2273 T} T{
2274 x
2275 T} T{
2276 x
2277 T} T{
2278 T} T{
2279 x
2280 T} T{
2281 x
2282 T} T{
2283 x
2284 T}
2285 _
2286 T{
2287 fish
2288 T} T{
2289 x
2290 T} T{
2291 x
2292 T} T{
2293 x
2294 T} T{
2295 x
2296 T} T{
2297 x
2298 T} T{
2299 x
2300 T}
2301 _
2302 T{
2303 cmd
2304 T} T{
2305 x
2306 T} T{
2307 x
2308 T} T{
2309 T} T{
2310 T} T{
2311 x
2312 T} T{
2313 T}
2314 _
2315 T{
2316 pwsh
2317 T} T{
2318 x
2319 T} T{
2320 x
2321 T} T{
2322 x
2323 T} T{
2324 x
2325 T} T{
2326 x
2327 T} T{
2328 T}
2329 _
2330 T{
2331 python
2332 T} T{
2333 x
2334 T} T{
2335 T} T{
2336 T} T{
2337 T} T{
2338 x
2339 T} T{
2340 x
2341 T}
2342 _
2343 T{
2344 perl
2345 T} T{
2346 x
2347 T} T{
2348 T} T{
2349 T} T{
2350 T} T{
2351 x
2352 T} T{
2353 x
2354 T}
2355 _
2356 T{
2357 ruby
2358 T} T{
2359 x
2360 T} T{
2361 T} T{
2362 T} T{
2363 T} T{
2364 x
2365 T} T{
2366 x
2367 T}
2368 _
2369 T{
2370 tcl
2371 T} T{
2372 x
2373 T} T{
2374 T} T{
2375 T} T{
2376 T} T{
2377 x
2378 T} T{
2379 x
2380 T}
2381 _
2382 T{
2383 cmake
2384 T} T{
2385 x
2386 T} T{
2387 T} T{
2388 T} T{
2389 T} T{
2390 T} T{
2391 x
2392 T}
2393 _
2394 T{
2395 r
2396 T} T{
2397 x
2398 T} T{
2399 T} T{
2400 T} T{
2401 T} T{
2402 x
2403 T} T{
2404 x
2405 T}
2406 _
2407 T{
2408 lisp
2409 T} T{
2410 x
2411 T} T{
2412 T} T{
2413 T} T{
2414 T} T{
2415 x
2416 T} T{
2417 x
2418 T}
2419 .TE
2420 .sp
2421 The \fBsource\-sh\fP command evaluates a shell script and produces the
2422 modulefile commands corresponding to the environment changes made by this
2423 script. \fBsource\-sh\fP is able to evaluate \fIsh\fP, \fIbash\fP, \fIksh\fP, \fIzsh\fP,
2424 \fIcsh\fP, \fItcsh\fP and \fIfish\fP shell scripts. \fBsource\-sh\fP produces
2425 environment changes corresponding to the kinds listed in the above table.
2426 Based on the evaluated script, refer to the above table to know the
2427 environment changes that will be rendered for the shell specified to
2428 \fBmodulecmd.tcl\fP program.
2429 .SH ENVIRONMENT
2430 .sp
2431 See the ENVIRONMENT \%<#\:module-environment> section in the
2432 module \%<#\:module-1> man page.
2433 .SH SEE ALSO
2434 .sp
2435 module \%<#\:module-1>, ml \%<#\:ml-1>, envml \%<#\:envml-1>, \fBTcl(n)\fP,
2436 \fBTclX(n)\fP, \fBid(1)\fP, \fBxrdb(1)\fP, \fBexec(n)\fP,
2437 \fBuname(1)\fP, \fBdomainname(1)\fP, \fBtclvars(n)\fP,
2438 \fBlsort(n)\fP, \fBstring(n)\fP
2439 .SH NOTES
2440 .sp
2441 Tcl was developed by John Ousterhout at the University of California
2442 at Berkeley.
2443 .sp
2444 TclX was developed by Karl Lehenbauer and Mark Diekhans.
2445 .SH Copyright
2446 1996-2025, Modules Contributors
2447 .\" End of generated man page.