Hacker News new | ask | show | jobs
by thejsjunky 4737 days ago
For stuff like the example where you know you will be reusing the command, it's better to use an alias or script. Even if it's just a command you plan to run in a couple times in a row you can add a temporay alias with: alias foo = "!!" - that way you don't have to hit ctrl+r each time.

Still, it's a good tip in terms of adding comments to unusual/confusing commands so when you go through your history you're not like "wtf was I doing here?" or if you unexpectedly need to recall it.