3 ms·
I use shell history all the time, but I don't personally find it useful to use for really common operations. I agree with the OP that commands that you execute
by tednaleid 15y ago
I use shell history all the time, but I don't personally find it useful to use for really common operations. I agree with the OP that commands that you execute 10's or 100's of times a day should be made as short as possible and they'll be part of muscle memory.
You can't rely on muscle memory for history commands as you always need to pause and verify that history found what you were expecting it to find. If your history looked like this (real shell history for me):
git push
ssh ec2-75-101-198-99.compute-1.amazonaws.com
the ^R would find the ssh command first, so you can't trust that "^Rpu" will always find the command so muscle memory can't set in and will slow you down
- bcl 15y agoI love ^R But make sure you've found the command you really thought you were looking for before mashing the return key. Sometimes my muscle memory is a bit too fast...
- pkrumins 15y agoIf you love ^R, you'll also love http://www.catonmat.net/blog/the-definitive-guide-to-bash-command-line-history/ http://www.catonmat.net/blog/the-definitive-guide-to-bash-co...
- jacobr 15y ago"\e[A": history-search-backward "\e[B": history-search-forward In .inputrc lets me just start typing a command and then press the up arrow to search the history, no need for ^R.