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.
This commit is contained in:
Emmanuel Kasper 2017-09-06 14:37:33 +02:00 committed by Wolfgang Bumiller
parent 8e677e74e7
commit a4f181a37e

View File

@ -431,7 +431,7 @@ my $get_property_description = sub {
} elsif ($style eq 'config-sub') { } elsif ($style eq 'config-sub') {
$res .= "`$name`="; $res .= "`$name`=";
} elsif ($style eq 'arg') { } elsif ($style eq 'arg') {
$res .= "`-$name` "; $res .= "`--$name` ";
} elsif ($style eq 'fixed') { } elsif ($style eq 'fixed') {
$res .= "`<$name>`: "; $res .= "`<$name>`: ";
} else { } else {
@ -578,7 +578,7 @@ sub usage_str {
if (!$prop->{$k}->{optional}) { if (!$prop->{$k}->{optional}) {
$args .= " " if $args; $args .= " " if $args;
$args .= "-$base <$type_text>" $args .= "--$base <$type_text>"
} }
} }