diff --git a/Pmodules/bash b/Pmodules/bash index 893730f..5476ca7 100644 --- a/Pmodules/bash +++ b/Pmodules/bash @@ -33,6 +33,9 @@ fi unset MODULE_VERSION unset MODULE_VERSION_STACK unset MODULESHOME +unset PMODULES_ENV + +PATH="${PMODULES_HOME}/bin:$PATH" ############################################################################# # implement module comand as shell function diff --git a/Pmodules/libstd.bash b/Pmodules/libstd.bash index ad7f0e6..846484d 100644 --- a/Pmodules/libstd.bash +++ b/Pmodules/libstd.bash @@ -67,14 +67,14 @@ std::get_abspath() { } std::append_path () { - local -r P="$1" - local -r d="$2" + local -r P=$1 + local -r d=$2 if ! echo ${!P} | egrep -q "(^|:)${d}($|:)" ; then if [[ -z ${!P} ]]; then - eval $P=\"${d}\" + export "$P=${d}" else - eval $P=\"${!P}:${d}\" + export "$P=${!P}:${d}" fi fi } @@ -85,9 +85,9 @@ std::prepend_path () { if ! echo ${!P} | egrep -q "(^|:)${d}($|:)" ; then if [[ -z ${!P} ]]; then - eval $P=${d} + export "$P=${d}" else - eval $P=${d}:${!P} + export "$P=${d}:${!P}" fi fi } diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index dd163d4..a52ba79 100755 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1410,7 +1410,7 @@ subcommand_list() { init_path() { std::replace_path PATH "${PMODULES_HOME%/*}/.*" - std::append_path PATH "${PMODULES_HOME}/bin" + std::prepend_path PATH "${PMODULES_HOME}/bin" } init_manpath() { @@ -1450,7 +1450,8 @@ pmodules_init() { LOADEDMODULES \ _LMFILES_ \ MODULEPATH \ - PATH + PATH \ + MANPATH } ############################################################################## diff --git a/Pmodules/profile.bash.in b/Pmodules/profile.bash.in index 11ddef7..3cc380c 100644 --- a/Pmodules/profile.bash.in +++ b/Pmodules/profile.bash.in @@ -12,10 +12,6 @@ # set default version : ${PMODULES_VERSION:=@PMODULES_VERSION@} -export PMODULES_DEFAULT_GROUPS -export PMODULES_DEFAULT_RELEASES -export PMODULES_VERSION - ############################################################################# # N O C H A N G E S B E L O W T H I S L I N E ! # #