The cursor was placed after the rejected input, both to indicate where
the mistake was, and to make it easy to <backspace> it out. But since
"retry" is only used when there are trailing words, that means the
cursor would be placed on the space between the mistake and the trailing
input. By putting it at the first character of the rejected input, it
is less visually ambiguous. The user can now use <delete> instead of
<backspace>.
When there were several matches that shared the same common prefix, but
with a different case, readline would eat the input from the case
sensitive longest common prefix up to where the case began to differ.
e.g. when "ibutton" and "iButton-touwtje" were available, typing
"ibu<tab>" would truncate the input to just "i" and on second tab show
both matches, but without ever completing beyond the "i".
(Bumps version to 3.8 because admins should update the plugin list.)
Deduplication didn't work on quantified additions, i.e. if you added
"20x clubmate" when there was already clubmate in the cart, it would add
just ONE item, and have a lingering message that the next thing would be
multiplied by 20.
This old bug was especially annoying if there is a barcode "20x
clubmate" to scan 20 bottles (which is the size of a crate), and this is
repeated.
The fix also uncovered another bug: newly added entries were selected
too early. There are two hooks, hook_add_entry and hook_added_entry, and
of course the selection should happen in between, not before the former.
No entry in UPGRADING.md, because I think it is extremely unlikely that
any plugin author will have used the selection feature yet, which is
very new.
Fixes deadlock if hook_checkout returns ABORT.
One of these days I want to implement the abort mechanism through
exceptions, even though that means handling it explicitly in more
places. Or maybe *because* that means handling it explicitly in more
places.
Next input would not be split.
> withdraw 1
Pending:
1.00 Withdrawal
Enter username to deduct 1.00 from your account; type 'abort' to abort.
> undo
Undo is not available mid-transaction. Enter 'abort' to abort.
> undo 123
undo 123: No such product, user, or command.
Of course, "undo 123" as top-level input should have been split on
whitespace.
Top-level input is handled by the 'command' method, so that should be a
reliable way to detect that the prompt is a top-level prompt, rather
than a follow-up prompt. Keeping an additional global boolean was a dumb
approach anyway.
This should have been done much earlier, but wasn't done for nostalgic reasons.
To new users, it didn't make sense that you could just enter an amount, and
revbank would just accept that as "withdrawal or unlisted product". It existed
for backwards compatibility with the very first revbank version, which didn't
have a product list, and which was not yet used with a barcode scanner. You
would simply enter the amount and your name, and there were no further
statistics.
Nowadays, there are statistics that are messed up if you don't use the product
codes. And some people were looking for a withdrawal command, and try 'take' as
that seems closest to it, but which instead transfers money to another account.
Additionally, some texts were changed for improved clarity. ("Enter username to
pay", when withdrawing, was confusing: one expects money back, not to pay more.)
The signatures feature has been "experimental" since Perl 5.20 (May 2014), but
expected to stay. After 8 years I'm ready to take the risk :)
Have added Perl v5.28 (June 2018) as the minimum requirement, even though the
current revbank should work with 5.20, to see if this bothers any users. Perl
v5.28 is in Debian "buster", which is now oldstable.
Bug:
> 2x unlisted 6
Please provide a short description: bar foo
foo: No such product, user, or command.
Fixed:
> 2x unlisted 6
Please provide a short description: bar foo
Pending:
2x {
6.00 bar foo
}
Enter username to pay 12.00; type 'abort' to abort.
This shifts the reader's focus to the messages from plugins, such as the
instruction to enter your username to pay.
It also looks nicer next to the new cleaner transaction overviews.
Was originally added in 2015 (commit bb8652f4ac89a7453394020a472279809413d10f),
but the line and the commit are nowhere to be found. It may have been lost in
a git merge.