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 $origword = my $word = shift @words;
|
||||||
my @allwords = ($origword);
|
my @allwords = ($origword);
|
||||||
|
|
||||||
|
next WORD if $word eq "\0SEPARATOR";
|
||||||
push @retry, $word;
|
push @retry, $word;
|
||||||
|
|
||||||
ALL_PLUGINS: { PLUGIN: for my $plugin (@plugins) {
|
ALL_PLUGINS: { PLUGIN: for my $plugin (@plugins) {
|
||||||
next WORD if $word eq "\0SEPARATOR";
|
|
||||||
|
|
||||||
$cart->prohibit_checkout(
|
$cart->prohibit_checkout(
|
||||||
@words && $words[0] ne "\0SEPARATOR",
|
@words && $words[0] ne "\0SEPARATOR",
|
||||||
|
@ -253,6 +254,14 @@ OUTER: for (;;) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($rv == ACCEPT) {
|
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 = ();
|
@retry = ();
|
||||||
next OUTER;
|
next OUTER;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue