mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-09 04:49:59 +00:00
getopt_usage: always remove $standard_output_options
Tools like pvesh and pveclient pass them as normal arguments. We use a simply heuristic to test if there is an 'output_format' parameter. If so, we remove all $standard_output_options and display [FORMAT_OPTIONS] instead.
This commit is contained in:
parent
62c66c47fb
commit
5c59d8f99c
@ -624,6 +624,16 @@ sub getopt_usage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# also remove $standard_output_options from $prop (pvesh, pveclient)
|
||||||
|
if ($prop->{'output-format'}) {
|
||||||
|
$has_output_format_option = 1;
|
||||||
|
foreach my $key (keys %$prop) {
|
||||||
|
if ($standard_output_options->{$key}) {
|
||||||
|
delete $prop->{$key};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my $out = '';
|
my $out = '';
|
||||||
|
|
||||||
my $arg_hash = {};
|
my $arg_hash = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user