Soft-require ';' after command arguments
Also: `next WORD if $word eq "\0SEPARATOR";` was in the wrong loop (harmless until this change)
This commit is contained in:
parent
daf0077d0d
commit
3c622ab6d4
1 changed files with 10 additions and 1 deletions
11
revbank
11
revbank
|
@ -182,10 +182,11 @@ OUTER: for (;;) {
|
|||
|
||||
my $origword = my $word = shift @words;
|
||||
my @allwords = ($origword);
|
||||
|
||||
next WORD if $word eq "\0SEPARATOR";
|
||||
push @retry, $word;
|
||||
|
||||
ALL_PLUGINS: { PLUGIN: for my $plugin (@plugins) {
|
||||
next WORD if $word eq "\0SEPARATOR";
|
||||
|
||||
$cart->prohibit_checkout(
|
||||
@words && $words[0] ne "\0SEPARATOR",
|
||||
|
@ -253,6 +254,14 @@ OUTER: for (;;) {
|
|||
}
|
||||
}
|
||||
if ($rv == ACCEPT) {
|
||||
if ($method ne 'command' and @words and $words[0] ne "\0SEPARATOR") {
|
||||
@retry = (); # remove what's already done
|
||||
push @retry, shift @words; # reject first
|
||||
push @retry, [@words];
|
||||
@words = ();
|
||||
$retry = "Confirm trailing input to execute. (Hint: use ';' after command arguments.)";
|
||||
redo OUTER;
|
||||
}
|
||||
@retry = ();
|
||||
next OUTER;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue