From cd810ab48fd071e1b47347641bcbdcbf76772c4e Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Mon, 21 Sep 2015 18:21:12 +0200 Subject: [PATCH] Pmodules/modulecmd.bash.in: - bugfix in 'module use' with out args --- Bootstrap/Pmodules/modulecmd.bash.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Bootstrap/Pmodules/modulecmd.bash.in b/Bootstrap/Pmodules/modulecmd.bash.in index 5554ed4..5e5da85 100755 --- a/Bootstrap/Pmodules/modulecmd.bash.in +++ b/Bootstrap/Pmodules/modulecmd.bash.in @@ -1156,9 +1156,13 @@ subcommand_use() { subcommand_generic1 use ${subcommand_switches} "${dir}" done } + + local opts='' + opts=$(pmodules::get_options -- '' "$@") || subcommand_help_unuse + eval set -- "${opts}" - if [[ $# == 0 ]]; then - std::print_info + if [[ $# == 1 ]]; then + print_info else use "$@" fi