From 3c622ab6d469078ff9f442ce9244345d5f53624e Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Tue, 26 Dec 2023 01:01:04 +0100 Subject: [PATCH] Soft-require ';' after command arguments Also: `next WORD if $word eq "\0SEPARATOR";` was in the wrong loop (harmless until this change) --- revbank | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/revbank b/revbank index c2aa3b1..ad4fc5d 100755 --- a/revbank +++ b/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; }