X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FCLIHandler.pm;h=a7ced38a41ccd04662297d8d5d0ab0c6c74a1bf7;hp=489ff979798fd63b1078f95bcaaceb375d5b0c75;hb=ea5a508493e9acac4c5a1949dd71fa081892428e;hpb=131f316b5c748c6d744c6678eedfd15bc7348f6d diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 489ff97..a7ced38 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -54,7 +54,7 @@ my $expand_command_name = sub { return $cmd if exists $def->{$cmd}; # command is already complete - my $is_alias = sub { ref($_[0]) eq 'HASH' && $_[0]->{alias} }; + my $is_alias = sub { ref($_[0]) eq 'HASH' && exists($_[0]->{alias}) }; my @expanded = grep { /^\Q$cmd\E/ && !$is_alias->($def->{$_}) } keys %$def; return $expanded[0] if scalar(@expanded) == 1; # enforce exact match