Olhando para o uso, o comportamento que você está vendo parece com o que eu esperaria do subcomando use
.
module use [-a |--append] directory [directory...]
By default, this subcommand prepends the directory to the
$MODULEPATH
environment variable. If the-a
or--append
argument is used, then the directory will be appended to$MODULEPATH
.
Com o subcomando unuse
, ele removerá o (s) caminho (s) fornecido (s).
module unuse directory [directory...]
Remove the directory from the $MODULEPATH environment variable.
Se você quiser substituir completamente uma variável, sempre poderá usar o comando setenv
.
setenv variable value
Set environment variable to value. The
setenv
command will also change the process' environment. A reference using Tcl's env associative array will reference changes made with thesetenv
command. Changes made using Tcl's env associative array will NOT change the user's environment variable like the setenv command. An environment change made this way will only affect the module parsing process. Thesetenv
command is also useful for changing the environment prior to theexec
orsystem
command. When a modulefile is unloaded,setenv
becomesunsetenv
. If the environment variable had been defined it will be overwritten while loading the modulefile. A subsequent unload will unset the environment variable - the previous value cannot be restored! (Unless you handle it explicitly ... see below.)....