]> git.proxmox.com Git - pve-client.git/blobdiff - pveclient
add missing file PVE/APIClient/Commands/config.pm
[pve-client.git] / pveclient
index 4a0ae506da21c435d84b5b9deaf5e1d8352bf978..f18dab902c231510aa8de7d2f76efa36007b9eef 100755 (executable)
--- a/pveclient
+++ b/pveclient
@@ -12,6 +12,7 @@ use PVE::CLIHandler;
 
 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;
@@ -36,6 +37,7 @@ my $cli_class_handlers = {
     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',
 };
 
@@ -69,10 +71,16 @@ if (my $method = $method_map->{$cmd}) {
     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 {