No maintained cheat sheet here either. I do use `history | grep` quite a lot though.
One thing I try to do is to keep my keyboard shortcuts consistent between programs/systems. That way the chance of my instinct of pressing `<CTRL>+a` to move the cursor to the start of the line will be correct more often.
Another thing I try to do when a project has a set of complex commands that are needed, is to add them as a rule in its Makefile, that way they're available for my colleagues as well.
I use zsh-histdb[1], which records my entire shell history for all time in a database, which also stores:
• The start and stop times of the command
• The working directory where the command was run
• The hostname of the machine
• A unique per-host session ID, so history from several sessions is not confused
• The exit status of the command
This the working directory of the command has been especially useful for me to get the context of what I did, not only the command itself.
I've been loving mcfly[0], a history search that can be bound to <ctrl+r>. It makes suggestions based on your current directory as well as your command history.
Probably because ctrl-R doesn't present you a list in most shells. Maybe you want to scan the list visually and look at neighboring commands. ctrl-R doesn't really take advantage of human vision by showing all results next to each other.
That's pretty much it. I used to have to use quite a few different shells, so `<CTRL> + r` wasn't always available, but `history | grep` usually was. Once I'd got in the the habit of using `history | grep` I found that I liked the extra context provided by seeing a group of commands with a few variations between the lines. So often it helps jog my memory of what parameters I'll need to change before using it.
For me that’s it indeed; grep, sometimes with -A -B is much faster in general for me because it might be similar commands which now will appear next to eachother.
Regular expressions. Sometimes you remember two non-adjacent parts. Ctrl-R doesn't let you find "when I used find with awk" unless you type in everything in between.
One thing I try to do is to keep my keyboard shortcuts consistent between programs/systems. That way the chance of my instinct of pressing `<CTRL>+a` to move the cursor to the start of the line will be correct more often.
Another thing I try to do when a project has a set of complex commands that are needed, is to add them as a rule in its Makefile, that way they're available for my colleagues as well.