When I enter a multiline block like a function definition and press Enter, I can press the up arrow to recall that whole block from history. Pressing up again moves the cursor up one line inside the block. But sometimes I actually want to go further back in history instead of moving within the current block.
Can we add a key combination, e.g. Ctrl+up/down, to skip the current multiline block and retrieve the previous (or next) complete history entry. This would give a clear way to choose between moving within the current block and navigating the broader history.
It’s also worth mentioning in general the Readline Command Names section in man bash, and the EDITING COMMANDS section in man readline, which are not the same.
Bash lists / implements some extra goodies like shell-forward-word, shell-backward-word and shell-backward-kill-word that figures out how quotation should affect delimiting for movement etc, rather than using naive whitespace delimiting. Readline on its own doesn’t have these, and they’re very useful in Bash for moving through filenames with spaces etc.
default_keymaps: Keymap = tuple([
(r"\<end>", "end-of-line"), # was 'end'
(r"\<home>", "beginning-of-line"), # was 'home'
...
(r"\EOF", "end"), # the entries in the terminfo database for xterms
(r"\EOH", "home"), # seem to be wrong. this is a less than ideal
])
But I don’t know how to trigger the \EOF and \EOH sequences from the keyboard…
I tried with a key.py to show the sequences of my input, it tells me that the \EOH and \EOF are exactly Home and End.
I think ctrl+home and ctrl+end would be more intuitive than the current keybinding\EOF and \EOH. It works logically the same as in Excel, where ctrl+home goes to uppermost-and-leftmost A1 and ctrl+end goes to the lowest-and-rightmost cell.