[pve-devel] [pve-common] print_usage_short: do not group subcommands

Dietmar Maurer dietmar at proxmox.com
Tue Jul 31 11:55:42 CEST 2018


For examply, do not group 'qm guest' usage.

Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 src/PVE/CLIHandler.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 <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') {
-- 
2.11.0




More information about the pve-devel mailing list