]> git.proxmox.com Git - pve-common.git/commitdiff
cli usage: remove extra newlines before descriptions
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 17 May 2023 08:23:20 +0000 (10:23 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 17 May 2023 08:23:22 +0000 (10:23 +0200)
Reduce wasting vertical space for both, the command description and
the property description, just print the respective text at the next
line, with no extra empty line in between.

For better visual command separation color would help more.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/RESTHandler.pm

index 944a04b96c87c00b172c4b4ccea85fb46253e154..db86af2a68d887a08aaaa3fab296265c5b42d9a2 100644 (file)
@@ -552,7 +552,6 @@ my $get_property_description = sub {
        my $indend = "             ";
 
        $res .= Text::Wrap::wrap('', $indend, ($tmp));
-       $res .= "\n",
        $res .= Text::Wrap::wrap($indend, $indend, ($descr)) . "\n\n";
 
        if (my $req = $phash->{requires}) {
@@ -735,7 +734,7 @@ sub getopt_usage {
            $out .= "\n$desc\n\n";
        } elsif ($format eq 'full') {
            my $desc = Text::Wrap::wrap('  ', '  ', ($info->{description}));
-           $out .= "\n$desc\n\n";
+           $out .= "\n$desc\n";
        }
     }