2 ms·
I have <M-p> and <M-n> bound to history-search-backward and history-search-forward respectively, so ls <M-p> inserts the most recent command in history that b
by lottin 11y ago
I have <M-p> and <M-n> bound to history-search-backward and history-search-forward respectively, so
ls <M-p>
inserts the most recent command in history that begins with 'ls ' in the command prompt. I don't know why this isn't the default, as it's extremely handy. Also it works with any CLI program that uses readline.
If you want to try it out, add this to your ~/.inputrc file.
"\ep": history-search-backward
"\en": history-search-forward