Skip to content

Commit 138e1fc

Browse files
committed
Adapt sh-to-mod alias parsing for Dash 0.5.13
Instead of being listed as name='value', aliases are now reported as 'name=value' on new Dash version (0.5.13). Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
1 parent 2e05270 commit 138e1fc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Modules 5.7.0 (not yet released)
3232
is observed when loading or unloading many modulefiles. (fix issue #603)
3333
* Script: add ``--with-lmod`` option to :command:`mb` command to compare
3434
current Modules version against an installed version of Lmod.
35+
* Update the :subcmd:`sh-to-mod` mechanism to correctly parse shell alias on
36+
Dash shell version 0.5.13.
3537

3638

3739
.. _5.6 release notes:

tcl/mfcmd.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ proc execShAndGetEnv {elt_ignored_list shell script args} {
13811381
2>/dev/null; echo $sep; alias; echo $sep; echo $sep; pwd"
13821382
set varre {export (\S+?)=["']?(.*?)["']?$}
13831383
set funcre {(\S+?) \(\)\s?\n?{\s?\n(.+?)\n}$}
1384-
set aliasre {(\S+?)='(.*?)'$}
1384+
set aliasre {([^='\s]+?)='?(.*?)'$}
13851385
set varvalmap [list {\"} \" \\\\ \\]
13861386
set alvalmap [list {'\''} ' {'"'"'} ']
13871387
}

0 commit comments

Comments
 (0)