I would also very much welcome this behaviour. I understand that tying that up to .intputrc might be problematic (especially on Windows) but I think the following default would be safe + nice:
-
Ctrl/Cmd+↑ does history search, with whatever is to the left of the cursor on the current line = opens a modal with the history and the possibility to click through the list (i.e. almost the current behaviour, except that I would restrict it to what is to the left of the cursor, which should be inconsequent in most cases but makes it easier to recover from mistakes).
-
↑ does history recall = replaces the current command with a command from history, but here also I would restrict results to whatever matches what is currently to the left of the cursor. With nothing typed, you get the current behaviour. With something typed you iterate through history, limited to items matching the current text.
For this to work, when the current command line is replaced by a line from history, the cursor should stay in the same place. This does not prevent execution of the code because pressing Enter executes the whole line, no matter where the cursor is.
Example. My history is
foo <- 1
fib <- 2
bar <- 3
Now my prompt looks like this
> f|
where | is the cursor.
Now, Ctrl/Cmd+↑ gives me a modal with
foo <- 1
fib <- 2
and selecting the first (oldest) element of the history fills the command prompt with
> f|oo <- 1
Note the position of the cursor. This way, typing Ctrl/Cmd+↑ again gives me the same options again (because only "f" is to the left of the cursor), which allows me to select a different one in case I clicked wrong.
Typing ↑ replaces the command line with
> f|ib <- 2
and typing ↑ again gives
> f|oo <- 1
Of course typing ↓ gives back
> f|ib <- 2
As @ilari.scheinin, my muscle memory is so used to this behaviour of ↑ that I am having trouble adjusting!