mirror of
git://git.proxmox.com/git/pve-guest-common.git
synced 2025-03-12 20:58:20 +03:00
replace complete_snapshot_name with snapshot_list
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
96d913b07b
commit
90fba9cdf3
@ -699,13 +699,14 @@ sub snapshot_rollback {
|
||||
|
||||
# bash completion helper
|
||||
|
||||
sub complete_snapshot_name {
|
||||
my ($class) = @_;
|
||||
my $vmid = $_[4][0];
|
||||
sub snapshot_list {
|
||||
my ($class, $vmid) = @_;
|
||||
|
||||
my $snapshot = eval {
|
||||
my $conf = $class->load_config($vmid);
|
||||
|
||||
my $snapshot = [ keys %{$conf->{snapshots}} ];
|
||||
my $snapshots = $conf->{snapshots} || [];
|
||||
[ sort keys %$snapshots ]
|
||||
} || [];
|
||||
|
||||
return $snapshot;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user