diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-06-28 07:06:11 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-06-28 07:06:11 +0000 |
commit | 7b02dcbc138f9aa51547445504acfdd32c5f8bf1 (patch) | |
tree | 9314f154c29dd25d7c1bd6b8e0a1052d14afef93 | |
parent | 693e214b84e219c5ad88065d538ad764f50e485d (diff) | |
download | urpmi-7b02dcbc138f9aa51547445504acfdd32c5f8bf1.tar urpmi-7b02dcbc138f9aa51547445504acfdd32c5f8bf1.tar.gz urpmi-7b02dcbc138f9aa51547445504acfdd32c5f8bf1.tar.bz2 urpmi-7b02dcbc138f9aa51547445504acfdd32c5f8bf1.tar.xz urpmi-7b02dcbc138f9aa51547445504acfdd32c5f8bf1.zip |
Allow to give several comma- or space-separated answers to the question
"One of the following packages is needed, what is your choice?" in urpmi
-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]; } |