Comment on Time-saving tips for LinuxComments−baha_man15y"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-backwardbind "\C-n":history-search-forward−jrockway15yWhy? 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.)−eeperson15yDoessn'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.−spudlyo15yYou usually can't use C-s because it's bound to stop.$ stty stop undef
Comments
"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
Why? 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.)
Doessn'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.
You usually can't use C-s because it's bound to stop.
$ stty stop undef