diff options
-rwxr-xr-x | urpmi | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -350,6 +350,11 @@ sub ask_choice { my $i = 0; foreach (@l) { message(" " . ++$i . "- $_") } $n = message_input(N("What is your choice? (1-%d) ", $i), undef, range_min => 0, range => $i); defined($n) && $n ne "0" or exit 1; # abort. + if ($n =~ /\D/) { + my @nn = map { $choices->[$_ - 1] } grep { !/\D/ } split /[, \t]+/, $n; + @nn or exit 1; + return @nn; + } } $choices->[$n - 1]; } |