mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-26 09:33:08 +02:00
modulecmd: parsing the args of sub-cmds simplified
This commit is contained 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
|
||||
|
||||
Reference in New Issue
Block a user