3 ms·
"In bash, use Ctrl-R to search through command history." Or, add these lines to your .bashrc to use Ctrl-p and Ctrl-n: bind "\C-p":history-search-backward bi
by baha_man 16y ago
"In bash, use Ctrl-R to search through command history."
Or, add these lines to your .bashrc to use Ctrl-p and Ctrl-n:
bind "\C-p":history-search-backward
bind "\C-n":history-search-forward
- jrockway 16y agoWhy? C-r and C-s already do each of these, and C-p and C-n are for going back and forward in history. (Personally, I use M-p and M-n so that bash in the terminal works like Emacs.)
- eeperson 16y agoDoessn't that just do the same thing as the built-in Ctrl-r and Ctrl-s? Also, Ctrl-p and Ctrl-n are already used to cycle through previous commands.
- spudlyo 16y agoYou usually can't use C-s because it's bound to stop. $ stty stop undef