mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
doc: desc. module-virtual command
This commit is contained in:
8
NEWS.rst
8
NEWS.rst
@@ -131,6 +131,14 @@ Modules 4.1.0 (2018-01-??)
|
||||
executes the active module command.
|
||||
* Fix modulefile Tcl interpreter reset when handling list variables. (fix
|
||||
issue#145)
|
||||
* Introduce 'module-virtual' modulefile Tcl command to associate a virtual
|
||||
module name to a modulefile. This module can be located with its virtual
|
||||
name and the associated modulefile is the script interpreted when loading,
|
||||
unloading, etc.
|
||||
* Resolution of relative paths occurring during a modulefile interpretation to
|
||||
target a modulefile or a modulepath now takes the directory of the currently
|
||||
interpreted modulefile as the current working directory to solve the
|
||||
relative paths.
|
||||
|
||||
|
||||
Modules 4.0.0 (2017-10-16)
|
||||
|
||||
@@ -408,4 +408,6 @@ Modules Specific Tcl Commands
|
||||
|
||||
**is-avail**
|
||||
|
||||
**module-virtual**
|
||||
|
||||
These Modules-specific Tcl commands appeared on version ``4.1`` and are not supported on compatibility version.
|
||||
|
||||
@@ -376,6 +376,18 @@ the *modulefile* is being loaded.
|
||||
|
||||
* another *modulefile* alias
|
||||
|
||||
**module-virtual** name modulefile
|
||||
|
||||
Assigns the *modulefile* to the virtual module *name*. This command should be
|
||||
placed in rc files in order to define virtual modules.
|
||||
|
||||
A virtual module stands for a module *name* associated to a *modulefile*. The
|
||||
modulefile is the script interpreted when loading or unloading the virtual
|
||||
module which appears or can be found with its virtual name.
|
||||
|
||||
The parameter *modulefile* corresponds to the relative or absolute file
|
||||
location of a *modulefile*.
|
||||
|
||||
**module-whatis** string
|
||||
|
||||
Defines a string which is displayed in case of the invocation of the
|
||||
@@ -475,7 +487,8 @@ is actually a directory, the directory is opened and a search begins for
|
||||
an actual *modulefile*. First, **modulecmd.tcl** looks for a file with
|
||||
the name *.modulerc* in the directory. If this file exists, its contents
|
||||
will be evaluated as if it was a *modulefile* to be loaded. You may place
|
||||
**module-version** and **module-alias** commands inside this file.
|
||||
**module-version**, **module-alias** and **module-virtual** commands inside
|
||||
this file.
|
||||
|
||||
Additionally, before seeking for *.modulerc* files in the module directory,
|
||||
the global modulerc file is sourced, too. If a named version default now
|
||||
@@ -499,9 +512,9 @@ difference is that *.version* only applies to the current directory, and the
|
||||
made in these files will affect the subsequently interpreted *modulefile*.
|
||||
|
||||
If no default version may be figured out, then the highest numerically
|
||||
sorted *modulefile* or module alias under the directory will be used. The
|
||||
dictionary comparison method of the **lsort**\ (n) Tcl command is used
|
||||
to achieve this sort. If highest numerically sorted element is an alias,
|
||||
sorted *modulefile*, virtual module or module alias under the directory will
|
||||
be used. The dictionary comparison method of the **lsort**\ (n) Tcl command is
|
||||
used to achieve this sort. If highest numerically sorted element is an alias,
|
||||
search continues on its *modulefile* target.
|
||||
|
||||
For example, it is possible for a user to have a directory named X11 which
|
||||
|
||||
Reference in New Issue
Block a user