]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/JSONSchema.pm
remove + from getopt's prefix_pattern
[pve-common.git] / src / PVE / JSONSchema.pm
index c925ecbad664164e4670d51e2a5002fa48d0725e..47aa2780ca9e356f382babfdf1ad10975c7261f0 100644 (file)
@@ -817,6 +817,11 @@ my $default_schema_noref = {
            optional => 1,
            description => "This indicates the default for the instance property."
        },
+        completion => {
+           type => 'coderef',
+           description => "Bash completion function. This function should return a list of possible values.",
+           optional => 1,
+        },
         disallow => {
            type => "object",
            optional => 1,
@@ -1077,6 +1082,8 @@ sub get_options {
        }
     }
 
+    Getopt::Long::Configure('prefix_pattern=(--|-)');
+
     my $opts = {};
     raise("unable to parse option\n", code => HTTP_BAD_REQUEST)
        if !Getopt::Long::GetOptionsFromArray($args, $opts, @getopt);