X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FJSONSchema.pm;h=47aa2780ca9e356f382babfdf1ad10975c7261f0;hp=c925ecbad664164e4670d51e2a5002fa48d0725e;hb=1068aeb3988b7ef080bd812bb1fa330c27e1b9f7;hpb=5851be88ad2a1187c949045541b37c442cc18221 diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index c925ecb..47aa278 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -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);