use warnings;
use PVE::APIClient::SafeSyslog;
-use PVE::APIClient::Exception qw(raise raise_param_exc);
use PVE::APIClient::RESTHandler;
$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 {
shift @$args; # no need for program name
my $print_result = sub {
foreach my $p (@_) {
- print "$p\n" if $p =~ m/^$cur/;
+ print "$p\n" if $p =~ m/^\Q$cur\E/;
}
};