From: Dietmar Maurer Date: Tue, 31 Jul 2018 09:55:42 +0000 (+0200) Subject: print_usage_short: do not group subcommands X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=c701c5659e4bf01b79dca6b47e0601724b7acb65 print_usage_short: do not group subcommands For examply, do not group 'qm guest' usage. Signed-off-by: Dietmar Maurer --- diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 13904e2..2107108 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -337,7 +337,7 @@ sub print_usage_short { print $fd "ERROR: $msg\n" if $msg; print $fd "USAGE: $exename [ARGS] [OPTIONS]\n\n"; - print {$fd} generate_usage_str('short', $cmd, ' ' x 7, "\n", sub { + print {$fd} generate_usage_str('short', $cmd, ' ' x 7, $cmd ? '' : "\n", sub { my ($h) = @_; return sort { if (ref($h->{$a}) eq 'ARRAY' && ref($h->{$b}) eq 'ARRAY') {