mirror of
https://github.com/envmodules/modules.git
synced 2026-05-30 00:12:31 +08:00
doc: desc. newline char support in env var value
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
This commit is contained in:
6
NEWS.rst
6
NEWS.rst
@@ -132,6 +132,12 @@ Modules 5.6.0 (not yet released)
|
||||
* Issue the *nearly-forbidden* warning at the end of the affected modulefile
|
||||
evaluation, ensuring it is always reported at the same stage regardless of
|
||||
where it is defined.
|
||||
* Change underlying shell code to set environment variable on *sh*, *bash*,
|
||||
*ksh*, *zsh* and *fish* shells: enclose value within single quotes rather
|
||||
escaping each special characters.
|
||||
* :mfcmd:`setenv` modulefile command now supports environment variable value
|
||||
containing newline character. Exception is made for *csh* and *tcsh* shells
|
||||
where newline characters are chopped from value. (fix issue #557)
|
||||
|
||||
.. _Security policy: https://github.com/envmodules/modules/blob/main/SECURITY.md
|
||||
.. _Modules chat room: https://matrix.to/#/#modules:matrix.org
|
||||
|
||||
@@ -1151,6 +1151,9 @@ The following modulefile Tcl commands appeared on Modules 5.
|
||||
Starting with version ``5.1``, the ``--set-if-undef`` option is added to set
|
||||
environment variable when modulefile is loaded only if not yet defined.
|
||||
|
||||
Starting with version ``5.6``, value set can contain newline character.
|
||||
Exception for csh shell family where such character is chopped from value.
|
||||
|
||||
:mfcmd:`source-sh`
|
||||
|
||||
Starting Modules ``5.1``, this modulefile command also tracks shell
|
||||
|
||||
@@ -1452,11 +1452,16 @@ the *modulefile* is being loaded.
|
||||
When the ``--set-if-undef`` option is set, environment variable is defined
|
||||
when *modulefile* is loaded only if not yet defined.
|
||||
|
||||
Any newline character in *value* is chopped if using *csh* or *tcsh* shells.
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. versionchanged:: 5.1
|
||||
Option ``--set-if-undef`` added
|
||||
|
||||
.. versionchanged:: 5.6
|
||||
Newline character in value supported except for *csh* and *tcsh* shells
|
||||
|
||||
.. mfcmd:: source-sh [--ignore eltlist] shell script [arg...]
|
||||
|
||||
Evaluate with *shell* the designated *script* with defined *arguments* to
|
||||
|
||||
Reference in New Issue
Block a user