We're using Modules 4.2.1 on a HPC system.
Using set-alias in a module always creates an alias in the target shell (bash mostly in our case), but that doesn't work for non-interactive shells; the alias is defined but without (for bash) shopt -s expand_aliases being executed, they're not usable.
The manpage states that set-alias will set an alias or function. Is there a way to force it to create a function instead of an alias?
set-function isn't much use as the definition has to be written in the target shell's syntax, and one of the benefits of using module files is that they're shell-agnostic.
I'm fairly certain this is new behaviour for 4.2.1 or thereabouts. Until about a year ago we were running an older version of modulefiles and I'm pretty certain we didn't get this problem.
Thanks,
Liam
Liam Gretton
Systems Specialist
Estates and Digital Services,
University of Leicester, University Road, Leicester, LE1 7RH, UK
e: lia...@le...<mailto:lia...@le...>
w: www.le.ac.uk<http://www.le.ac.uk/>
[cid:image001.png@01D8A365.C78CAFA0]
Follow us on Twitter<https://twitter.com/uniofleicester> or visit our Facebook<http://www.facebook.com/uniofleicester> page
|