If you write the following in the interpreter:
And use up-arrow (or whatever your particular binding is), you get
Which is nearly useless. The history should instead group an entire statement. For example, in zsh, if you write:
Then hitting up arrow gives you:
rlwrap is not smart enough to either, it would probably require more configurability than is reasonable for it to offer, so we should fix the interaction with jline to get the more useful behavior.