diff --git a/Pmodules/bash b/Pmodules/bash index 9f0bf8f..076fa54 100644 --- a/Pmodules/bash +++ b/Pmodules/bash @@ -34,6 +34,8 @@ unset MODULE_VERSION unset MODULE_VERSION_STACK unset MODULESHOME +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 bf8e968..c3869cd 100755 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1555,7 +1555,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() { @@ -1597,7 +1597,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 ! # #