Tab completion for yes/no ;)
This commit is contained in:
parent
9b9c255a1c
commit
35100c59ef
1 changed files with 4 additions and 1 deletions
5
revbank
5
revbank
|
@ -524,7 +524,10 @@ LINE: for (;;) {
|
||||||
if ($deposit) {
|
if ($deposit) {
|
||||||
print "Input '$element' not recognised.\n";
|
print "Input '$element' not recognised.\n";
|
||||||
for (;;) {
|
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)$/) {
|
if ($yesno =~ /^(?:y|yes)$/) {
|
||||||
create_account($element);
|
create_account($element);
|
||||||
$user = $element;
|
$user = $element;
|
||||||
|
|
Loading…
Add table
Reference in a new issue