Tab completion for yes/no ;)

This commit is contained in:
RevBar 2011-06-10 01:23:04 +02:00
parent 9b9c255a1c
commit 35100c59ef

View file

@ -524,7 +524,10 @@ LINE: for (;;) {
if ($deposit) {
print "Input '$element' not recognised.\n";
for (;;) {
my $yesno = prompt "Add new account for user '$element'? ";
my $yesno = prompt(
"Add new account for user '$element'? ",
[ qw/yes no/ ] # tab completion ;)
);
if ($yesno =~ /^(?:y|yes)$/) {
create_account($element);
$user = $element;