Debian Codegraph @

doc/build/envml.1

raw
1 .\" Man page generated from reStructuredText.
2 .
3 .
4 .nr rst2man-indent-level 0
5 .
6 .de1 rstReportMargin
7 \\$1 \\n[an-margin]
8 level \\n[rst2man-indent-level]
9 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
10 -
11 \\n[rst2man-indent0]
12 \\n[rst2man-indent1]
13 \\n[rst2man-indent2]
14 ..
15 .de1 INDENT
16 .\" .rstReportMargin pre:
17 . RS \\$1
18 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
19 . nr rst2man-indent-level +1
20 .\" .rstReportMargin post:
21 ..
22 .de UNINDENT
23 . RE
24 .\" indent \\n[an-margin]
25 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
26 .nr rst2man-indent-level -1
27 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
29 ..
30 .TH "ENVML" "1" "2025-11-25" "5.6.1" "Modules"
31 .SH NAME
32 envml \- run a command in an environment setting up by Modules
33 .SH SYNOPSIS
34 .sp
35 \fBenvml\fP [\fIMODULE_ACTION\fP]... [\-\-] \fICOMMAND\fP [\fIARG\fP]...
36 .SH DESCRIPTION
37 .sp
38 The \fBenvml\fP command configures the environment using specified
39 Environment Modules actions and then given command.
40 .sp
41 This is useful for running a command in a modified environment without
42 permanently altering the current shell session.
43 .sp
44 \fBenvml\fP interprets its first arguments as module actions, then
45 switches to command execution after either encountering \fB\-\-\fP or determining
46 that the remaining arguments form the actual command to run.
47 .SH MODULE_ACTION FORMAT
48 .sp
49 Each module action argument can be one of the following forms:
50 .INDENT 0.0
51 .IP \(bu 2
52 \fBpurge\fP
53 Unload all currently loaded modulefiles.
54 .IP \(bu 2
55 \fBrestore[=coll]\fP
56 Restore the module environment from the named collection \fBcoll\fP\&. If no
57 name is given, restores the default collection.
58 .IP \(bu 2
59 \fBunload=mod1[&mod2...]\fP
60 Unload one or more specified modulefiles.
61 .IP \(bu 2
62 \fBswitch=mod1&mod2\fP
63 Unload \fBmod1\fP and load \fBmod2\fP\&.
64 .IP \(bu 2
65 \fB[load=]mod1[&mod2...]\fP
66 Load one or more specified modulefiles. \fBload=\fP can be omitted.
67 .UNINDENT
68 .sp
69 Multiple MODULE_ACTIONs can be passed in a single argument using the colon
70 (\fB:\fP) separator. The ampersand (\fB&\fP) is used to specify multiple modules
71 in a single action.
72 .SH COMMAND EXECUTION
73 .sp
74 Everything following the \fB\-\-\fP separator is treated as the command to execute
75 in the modified environment.
76 .sp
77 If no \fB\-\-\fP separator is provided, \fBenvml\fP assumes the first
78 argument is a MODULE_ACTION and the remaining arguments form the command to
79 execute.
80 .SH OPTIONS
81 .INDENT 0.0
82 .TP
83 .B \-\-help, \-h
84 Display usage information and exit.
85 .UNINDENT
86 .SH EXAMPLES
87 .sp
88 Restore default module collection then run \fBcommand arg1 arg2\fP:
89 .INDENT 0.0
90 .INDENT 3.5
91 .sp
92 .EX
93 envml restore command arg1 arg2
94 .EE
95 .UNINDENT
96 .UNINDENT
97 .sp
98 Purge all modules, then load \fBmod1\fP and \fBmod2\fP, and run the command:
99 .INDENT 0.0
100 .INDENT 3.5
101 .sp
102 .EX
103 envml purge:mod1:mod2 command arg1 arg2
104 .EE
105 .UNINDENT
106 .UNINDENT
107 .sp
108 Use the \fB\-\-\fP separator to avoid ambiguity:
109 .INDENT 0.0
110 .INDENT 3.5
111 .sp
112 .EX
113 envml restore load=mod1&mod2 \-\- command arg1 arg2
114 .EE
115 .UNINDENT
116 .UNINDENT
117 .SH EXIT STATUS
118 .sp
119 The \fBenvml\fP command returns the exit status of the executed command
120 or \fB1\fP if module action fails.
121 .SH DIAGNOSTICS
122 .sp
123 If the \fBmodule\fP command is not available in the shell (i.e., not a
124 shell function), \fBenvml\fP will print an error and exit.
125 .SH SEE ALSO
126 .sp
127 \fI\%module\fP, \fI\%ml\fP, \fI\%modulefile\fP
128 .SH COPYRIGHT
129 1996-2025, Modules Contributors
130 .\" Generated by docutils manpage writer.
131 .