Hacker News new | ask | show | jobs
by anbotero 997 days ago
I used to do this, but with fish shell unless I have very similar commands, I just type part of the whole line to something I (personally) associate it with and that’s it, that’s the command.

I press a space before commands with sensitive information so they don’t stay in my history or throwaway commands that I’m 99% sure I won’t use again.

Complicated ones I create a function for it, but I no longer carry aliases on my shell configuration, and I prefer the legibility of my commands/history.

1 comments

history | grep in regular bash
Or ^Rpartofcommand to do an interactive history search.

This is a priceless feature, which, as I keep finding out, too many people do not know about, and they waste time faffing about pressing up and down, trying to find that one command their entered ten minutes ago. :)