From: Emmanuel Kasper Date: Wed, 6 Sep 2017 12:37:33 +0000 (+0200) Subject: Use double hyphens when prefixing command options in the documentation X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=a4f181a37e2d3cfd116f7739f3e9f68ced99add3 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. --- 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>" } }