lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


hi Steve,

By default, non-interactive shells do not
expand aliases. We have some LMOD modules
(written in lua) whose functionality depends
on defining aliases. Ideally, a lua command
can be issued at the start of the modulefile
to enable aliases. It certainly must be possible,
because environment variables in the parent shell
can be set using lua.

There are three other workarounds we have considered:
(1) educate users that every job script that
requires aliases must include the command
shopt -s expand_aliases
(2) educate users to use interactive shells for their
job scripts if aliases are required.
(3) globally set expand_aliases to true.

None of these options hold much appeal presently.

thanks

~ ben


> Benjamin,
>
> I have needs like this every once in a while, and in Linux it's
> somewhat tricky. A called program can't "reach back" and change the
> environment of the caller under normal conditions. But I've found there
> are many, many ways to do whatever you want to get done. Can you tell
> us what you're trying to accomplish?
>
> Thanks
>
> SteveT