]> git.proxmox.com Git - pve-common.git/commitdiff
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 48798ba9a804c6f7b7a729d5ffddf27752ea2ea7..6bf38eaee4012653f31c2b0195ec7f1e089d5a78 100644 (file)
@@ -251,7 +251,7 @@ my $print_bash_completion = sub {
        if ($d->{completion}) {
            my $vt = ref($d->{completion});
            if ($vt eq 'CODE') {
        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') {
                &$print_result(@$res);
            }
        } elsif ($d->{type} eq 'boolean') {