summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
50b89b8)
Improves usabillity by allowing to pass a sub copmmand unquoted to
the help command, e.g.:
# pveum help user delete
without this only a quoted version worked, e.g.:
# pveum help "user delete"
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
parameters => {
additionalProperties => 0,
properties => {
parameters => {
additionalProperties => 0,
properties => {
- cmd => {
- description => "Command name",
- type => 'string',
- optional => 1,
+ 'extra-args' => PVE::JSONSchema::get_standard_option('extra-args', {
+ description => 'Shows help for a specific command',
completion => $complete_command_names,
completion => $complete_command_names,
verbose => {
description => "Verbose output format.",
type => 'boolean',
verbose => {
description => "Verbose output format.",
type => 'boolean',
- my $cmd = $param->{cmd};
+ my $cmd = $param->{'extra-args'};
- my $verbose = defined($cmd) && $cmd;
+ my $verbose = defined($cmd) && $cmd;
$verbose = $param->{verbose} if defined($param->{verbose});
if (!$cmd) {
$verbose = $param->{verbose} if defined($param->{verbose});
if (!$cmd) {
my $handle_cmd = sub {
my ($args, $pwcallback, $preparefunc, $stringfilemap) = @_;
my $handle_cmd = sub {
my ($args, $pwcallback, $preparefunc, $stringfilemap) = @_;
- $cmddef->{help} = [ __PACKAGE__, 'help', ['cmd'] ];
+ $cmddef->{help} = [ __PACKAGE__, 'help', ['extra-args'] ];
my $cmd_str = join(' ', @$args);
my ($cmd, $def, $cmd_args) = resolve_cmd($args);
my $cmd_str = join(' ', @$args);
my ($cmd, $def, $cmd_args) = resolve_cmd($args);