From a4f181a37e2d3cfd116f7739f3e9f68ced99add3 Mon Sep 17 00:00:00 2001 From: Emmanuel Kasper Date: Wed, 6 Sep 2017 14:37:33 +0200 Subject: [PATCH] Use double hyphens when prefixing command options in the documentation This makes our man pages follow the GNU long option recommandations where non-single character options are prefixed with a double hyphen (https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html) The benefit for PVE is that our documentation looks more similar to what a user with previous Linux knowledge is used to. Our bash autocompletion helper only completes options using double hyphens too. --- src/PVE/RESTHandler.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/RESTHandler.pm b/src/PVE/RESTHandler.pm index d700976..5c1d419 100644 --- a/src/PVE/RESTHandler.pm +++ b/src/PVE/RESTHandler.pm @@ -431,7 +431,7 @@ my $get_property_description = sub { } elsif ($style eq 'config-sub') { $res .= "`$name`="; } elsif ($style eq 'arg') { - $res .= "`-$name` "; + $res .= "`--$name` "; } elsif ($style eq 'fixed') { $res .= "`<$name>`: "; } else { @@ -578,7 +578,7 @@ sub usage_str { if (!$prop->{$k}->{optional}) { $args .= " " if $args; - $args .= "-$base <$type_text>" + $args .= "--$base <$type_text>" } } -- 2.39.2