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.
25d9bda941 broke this check,
but it is a better idea to check against the actual type
rather then the rendered type text anyway.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
this would previously convert properties that matched
'^([a-z]+)(\d+)$' even if they were not part of an indexed
properties series (which always start with 0).
This fixes previously wrongly converted properties:
-smbios1
-server2
this would previously skip (i.e., ignore) properties that
matched '^([a-z]+)(\d+)$' even if they were not part of an
indexed properties series (which always start with 0).
This fixes previously missing API dump occurrences of:
-smbios1
-comments6
-netmask6
-gateway6
-address6
-dns1
-dns2
-dns3
-server1
-server2
For the CLI man pages and documentation, mapped parameters
('content' strings in API2 which are loaded from file paths
in CLI) get special treatment and are displayed with the
type 'filepath'.
This is modelled after the way read_password() is used to
wrap -password parameters on the command line. If a mapping
for a certain API method and parameter is defined in the
sub class of CLIHandler.pm, the parameter is interpreted as
a file path on the command line and the parameter is
filled with the string contents of the referenced file.
This allows us to use the same API schema once in API2, but
overwrite the behaviour for individual parameters in the CLI
tools when desired.
added 'extra-args' standard option
added 'extra-args' handling to PVE::JSONSchema::get_options
untainting 'extra-args' separately in RESTHandler::handle
regexps are greedy so the first substitution eats up
multiple groups of double-colons up to the last one already.
So unless there's some intended hidden side effect this
statement has no obvious purpose.