diff --git a/Pmodules/libpmodules.bash.in b/Pmodules/libpmodules.bash.in index 8b6992b..8801f39 100644 --- a/Pmodules/libpmodules.bash.in +++ b/Pmodules/libpmodules.bash.in @@ -12,6 +12,11 @@ declare -A OverlayDict declare -a OverlayList declare -Ag Dir2OverlayMap +declare -r ol_normal='n' +declare -r ol_hiding='h' +declare -r ol_replacing='r' + + # initialize help text of 'module --version' Help['version']=" Pmodules @PMODULES_VERSION@ using Tcl Environment Modules @@ -113,7 +118,8 @@ pm::read_config(){ ". as \$item ireduce ({}; . *+ \$item) |.Overlays.${ol}" \ "${config_files[@]}" | \ sed 's/: /=/; s/\(.*\)/local \1/') - : ${type:=n} + : ${type:=${ol_normal}} + echo type=${type} case ${type} in ${ol_normal} | ${ol_replacing} | ${ol_hiding} ) : diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 532553e..f1564f1 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -44,10 +44,6 @@ else declare -r modulecmd="${libexecdir}/modulecmd.bin" fi -declare -r ol_normal='n' -declare -r ol_hiding='h' -declare -r ol_replacing='r' - declare verbosity_lvl=${PMODULES_VERBOSITY:-'verbose'} declare Shell=''