mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-07-04 04:40:50 +02:00
Merge branch '167-modulecmd-fix-issue-with-unalias-in-purge-cmd' into '32-overlay-implementation'
Resolve "modulecmd: fix issue with unalias in purge cmd." See merge request Pmodules/src!140
This commit is contained in:
@@ -754,7 +754,7 @@ subcommand_unload() {
|
||||
local arg
|
||||
for arg in "${args[@]}"; do
|
||||
local output=$("${modulecmd}" "${Shell}" 'unload' "${arg}")
|
||||
eval "$(echo "${output}"|sed -e 's/;unalias [^;]*//g')"
|
||||
eval "$(echo "${output}"|${sed} -e 's/;unalias [^;]*//g')"
|
||||
case ${Shell} in
|
||||
sh | bash | zsh )
|
||||
echo "${output}"
|
||||
@@ -1922,8 +1922,8 @@ subcommand_purge() {
|
||||
"${error_txt}"
|
||||
fi
|
||||
if [[ "${Shell}" == "sh" ]]; then
|
||||
# for sh-like shells just echo
|
||||
echo "${output}"
|
||||
# for sh-like shells just echo
|
||||
eval "$(echo "${output}"|${sed} -e 's/;unalias [^;]*//g')"
|
||||
else
|
||||
# re-run with right shell
|
||||
"${modulecmd}" "${Shell}" 'purge'
|
||||
|
||||
Reference in New Issue
Block a user