diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 25f1036..cecce8a 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -2925,12 +2925,10 @@ case ${subcommand} in ;; esac - -tmp=$("${getopt}" --name="${CMD}" ${Options[${subcommand}]} -- "${opts[@]}" "$@" ) \ - || print_help "${subcommand}" -eval args=( "$tmp" ) -unset tmp -subcommand_${Subcommands[$subcommand]} "${args[@]}" +# parse arguments of the sub-command and call it +set -- $("${getopt}" --unquoted --name="${CMD}" ${Options[${subcommand}]} -- "${opts[@]}" "$@" ) \ + || print_help "${subcommand}" +subcommand_${Subcommands[$subcommand]} $@ # Local Variables: # mode: sh