From ee2018941ae28d7f0bfbf84de36aea19c99fe84b Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Wed, 21 Jun 2023 13:49:45 +0200 Subject: [PATCH] modulecmd: argument/option handling fixed --- Pmodules/modulecmd.bash.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 5311ddd..d5d368e 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -3276,9 +3276,12 @@ case ${subcommand} in esac # parse arguments of the sub-command and call it -set -- $("${getopt}" --unquoted --name="${CMD}" ${Options[${subcommand}]} -- "${opts[@]}" "$@" ) \ +temp=$("${getopt}" --name="${CMD}" ${Options[${subcommand}]} -- "${opts[@]}" "$@" ) \ || print_help "${subcommand}" -subcommand_${Subcommands[$subcommand]} $@ +eval set -- "${temp}" +unset temp + +subcommand_${Subcommands[$subcommand]} "$@" # Local Variables: # mode: sh