Skip to content

Commit e87074a

Browse files
committed
doc: desc. newline char in env var value in MIGRATING
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent f3ff5fa commit e87074a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

MIGRATING.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,33 @@ With this modulefile command there is no need to define the ``ModulesHelp``
8686
procedure anymore. As :mfcmd:`module-help` is reported on module *display*
8787
evaluation, help message will also be visible there.
8888

89+
Support for newline character in environment variable value
90+
-----------------------------------------------------------
91+
92+
It is now possible on *sh*, *bash*, *ksh*, *zsh* and *fish* shells to set
93+
value for environment variable that contains newline character:
94+
95+
.. parsed-literal::
96+
97+
:ps:`$` cat /path/to/modulefiles/bar/1.0
98+
#%Module
99+
setenv BAR "multi\nline\nvalue"
100+
:ps:`$` module load bar
101+
:ps:`$` echo "$BAR"
102+
multi
103+
line
104+
value
105+
106+
Generated shell code on these shells has been changed to enclose value within
107+
single quotes rather escaping each special characters:
108+
109+
.. parsed-literal::
110+
111+
:ps:`$` module mod-to-sh bash bar/1.0
112+
BAR='multi
113+
line
114+
value'; export BAR;
115+
89116
90117
v5.5
91118
====

0 commit comments

Comments
 (0)