I am a huge fan of this magic in my
.inputrc which allow me to quickly autocomplete a command with the up arrow key.
"\e[A": history-search-backward "\e[B": history-search-forward "\eOA": history-search-backward "\eOB": history-search-forward
However very often, I have to ssh on a vanilla linux where I have to use CTRL+R. I then usually became very unproductive because I don't know how to use this command.
It is time to question my workflow. Can I be more productive by using the native bash history reverse search than my
Concrete use case
I would like to recall the last
python line I have written. With my solution I do
pyt+ ↑ + Enter
With the reverse-i-search, if I do CTRL + R,
pyt. I usually get any command containing
pyt, not the last command starting with
More annoying, I usually realize I should use my history when I already typed let's say
pyth. If I hit CTRL + R I get:
Which is very confusing because if I type
o I suddenly get a WTF command I typed ages ago containing just a
I am totally sure I am not using the reverse-i-search the right way. What am I missing?