Skip to content

Inconsistent result returned by zsh completion script when quarantine variables are defined #350

@xdelaruelle

Description

@xdelaruelle

When some environment variables are defined for Modules quarantine mechanism:

$ module config run_quarantine 
Modules Release 4.5.1 (2020-06-01)

- Config. name ---------.- Value (set by if default overridden) ---------------
run_quarantine            LD_LIBRARY_PATH LD_PRELOAD (env-var)

Completion script on Zsh shell returns inconsistent results:

$ zsh
% autoload compinit
% compinit
% module -V
Modules Release 4.5.1 (2020-06-01)
% module avail<tab>
be                    load
\(cannot              module-git
cannot                module-info
dot                   modules
dynamically           mpi/
ERROR:                null
executable\):         object
from                  position-independent
ignored.              preloaded
LD_PRELOAD            use.own
ld.so:                \'/usr/bin/tclsh\'

It seems related to the evaluation of following line in _module_raw shell function:

$ /usr/share/Modules/libexec/modulecmd.tcl zsh autoinit
_module_raw() {
...
      eval `eval ${=_mlre}/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl zsh '"$@"'`;
...

Quarantine variables set in _mlre variable are expanded to the /usr/bin/tclsh value rather being set empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions