4 ms·
>Granted, I use zsh, but I think it works pretty much the same in bash. I also use zsh and I don't even use ctrl+r anymore. I just type a portion of the comman
by Jerry2 10y ago
>Granted, I use zsh, but I think it works pretty much the same in bash.
I also use zsh and I don't even use ctrl+r anymore. I just type a portion of the command I remember and hit the up arrow key. Almost always the command I want is only one to three arrow keys away. zsh matches partial commands really well.
- pmoriarty 10y agoI like the incremental searching that using control-r lets you do. That can come in really handy when I don't remember precisely what the command I want is. I can start typing and then type more once I see some results to hone in more precisely to what I want, or even backspace over some of what I've typed and type some more without having to start all over again. Also, using control-r instead of the arrow keys doesn't force me to move my wrists and lets me keep my fingers mostly on the home row. I try to use the arrow keys as little as possible.
- JoshTriplett 10y agoBash has similar commands available to move up and down by matching commands. However, I find such modal behavior of up/down confusing; I prefer to have up and down always move by one command, and use C-r for reverse isearch.
- distrill 10y agoAgreed, but this only works if you know you are right about the beginning of the command. Ctrl-R is still the best way I know to search for a command that I may not be sure about the first letters of.
- rhinoceraptor 10y agoCtrl-p/n are a quicker way to go up and down the history.