6
I'm moving from Tcsh to Bash, and I would like to take the ESC+p feature with me.
If I type , say git cl
, and then press ESC+p, it should complete automatically to the last command that starts with git cl
(e.g. git clone something
), and place the cursor at the end.
I added the following 2 lines to ~/.inputrc
:
"\ep": history-search-backward
"\en": history-search-forward
which gives me exactly what I need except that the cursor is not moved to the end.
Any ideas how to fix that?
Adding this to my inputrc right now, something I was curious about myself! – Rob – 2011-11-01T17:31:52.470
It works, but I didn't think about what it would do to searching through multiple entries. I usually will type in ssh and go through the history search. Moving the cursor to the end of the line kind of ruins that. – Rob – 2011-11-01T17:41:43.910
Exactly - I don't care for this command combination myself, because as you say it breaks searching through multiple matching entries. But it's what Misha asked for. – Andrew Schulman – 2011-11-01T17:44:20.630