]> git.proxmox.com Git - pve-common.git/commitdiff
Use double hyphens when prefixing command options in the documentation
authorEmmanuel Kasper <e.kasper@proxmox.com>
Wed, 6 Sep 2017 12:37:33 +0000 (14:37 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 12 Sep 2017 10:18:50 +0000 (12:18 +0200)
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

index d700976082655f3c4f9078fd78ef3793b88a01c4..5c1d419d2eebb89374603ea6fbe81de7c0690ecf 100644 (file)
@@ -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>"
        }
     }