mirror of
git://git.proxmox.com/git/pve-common.git
synced 2024-12-24 01:33:48 +03:00
generate_usage_str: show short usage help for unknown commands
followup for previous commit to show the full short usage string for the CLI tool in the case of an unknown command Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
57c0d0c69c
commit
24ccf353c7
@ -132,7 +132,7 @@ sub generate_usage_str {
|
||||
$cli_handler_class->can('string_param_file_mapping');
|
||||
|
||||
my ($subcmd, $def, undef, undef, $cmdstr) = resolve_cmd($cmd);
|
||||
die "no such command '$cmd->[0]'\n" if !defined($def) && ref($cmd) eq 'ARRAY';
|
||||
$abort->("unknown command '$cmdstr'") if !defined($def) && ref($cmd) eq 'ARRAY';
|
||||
|
||||
my $generate;
|
||||
$generate = sub {
|
||||
|
Loading…
Reference in New Issue
Block a user