pass whole command line to bash completion function
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 18 Sep 2015 05:46:56 +0000 (07:46 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 18 Sep 2015 05:46:56 +0000 (07:46 +0200)
src/PVE/CLIHandler.pm

index 48798ba..6bf38ea 100644 (file)
@@ -251,7 +251,7 @@ my $print_bash_completion = sub {
        if ($d->{completion}) {
            my $vt = ref($d->{completion});
            if ($vt eq 'CODE') {
-               my $res = $d->{completion}->($cmd, $pname, $cur);
+               my $res = $d->{completion}->($cmd, $pname, $cur, [@args]);
                &$print_result(@$res);
            }
        } elsif ($d->{type} eq 'boolean') {