Re:A great list of command-line tips
by avar on Sunday April 15, 2012 @03:29PM
(#3844448)
The #1 thing that'll improve most people's workflow is learning how to use readline effectively. I'm continually amazed by how many people who use shells daily use the arrow keys to navigate around, don't know about common things like C-r to reverse-search through history and other commands that make editing on the command-line a breeze.
[ Parent
| on HN ]
In aid of helping others along this path, here's a crib sheet I've found for readline shortcuts. I've been meaning to become more efficient in using bash and this might just be the push I need.
http://www.bigsmoke.us/readline/shortcuts
Thanks. That's an excellent reference. I've been pointing people towards the relevant section in the readline or bash manuals, but this is much better.
I've honestly tried to use the man pages for bash before, they are unarguably complete but unfortunately difficult to get started with. The chances of me knowing ahead of time to either search first for "readline" followed "Commands for Moving" or read the full man page until I get to line 2957 is slim.
I have one cheat sheet at my desk, and it is this one.
Agreed. It's almost always worth investing time in learning your tools, and if you're like me the bash shell is your fundamental, most used tool.
I have to give Peteris Krumins credit for creating some great references like http://www.catonmat.net/blog/the-definitive-guide-to-bash-co... and http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-shee... (or for the depraved, http://www.catonmat.net/blog/bash-emacs-editing-mode-cheat-s...)
set -o vi