use PVE::APIClient::LWP;
use PVE::APIClient::Helpers;
+use PVE::APIClient::Commands::config;
use PVE::APIClient::Commands::remote;
use PVE::APIClient::Commands::list;
use PVE::APIClient::Commands::lxc;
list => 'PVE::APIClient::Commands::list',
lxc => 'PVE::APIClient::Commands::lxc',
remote => 'PVE::APIClient::Commands::remote',
+ config => 'PVE::APIClient::Commands::config',
help => 'PVE::APIClient::Commands::help',
};
if ($ENV{COMP_LINE} =~ m/^(.*pveclient\s+($cmdlist)\s+)(.*)$/) {
my $cmd = $2;
my $class = $cli_class_handlers->{$cmd} || die "internal error";
- $ENV{COMP_LINE} = "pveclient $3";
- $ENV{COMP_POINT} = length($ENV{COMP_LINE});
- @ARGV = ('bashcomplete', 'pveclient', $ARGV[1], $ARGV[2]);
+ if ($cmd eq 'list') { # simple commands
+ $ENV{COMP_LINE} = "pveclient $3";
+ $ENV{COMP_POINT} = length($ENV{COMP_LINE});
+ @ARGV = ('bashcomplete', 'pveclient', $ARGV[1], $ARGV[2]);
+ } else {
+ $ENV{COMP_LINE} = "pveclient $3";
+ $ENV{COMP_POINT} = length($ENV{COMP_LINE});
+ @ARGV = ('bashcomplete', 'pveclient', $ARGV[1], $ARGV[2]);
+ }
$class->run_cli_handler();
} else {