]> git.proxmox.com Git - pve-common.git/commitdiff
print_usage_short: do not group subcommands
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 31 Jul 2018 09:55:42 +0000 (11:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 1 Aug 2018 06:54:35 +0000 (08:54 +0200)
For examply, do not group 'qm guest' usage.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
src/PVE/CLIHandler.pm

index 13904e22b239878068f7d27213e496df4926646f..2107108699a4a00b8106e37f38a19b202c058a00 100644 (file)
@@ -337,7 +337,7 @@ sub print_usage_short {
     print $fd "ERROR: $msg\n" if $msg;
     print $fd "USAGE: $exename <COMMAND> [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') {