❌ ❌ at

I have largely replaced aliases or functions in ~/.bash_aliases (called from ~/.bashrc) with just named functions in .bash_history. Version control becomes natural and immediate.

So I just:
$ useful_function() { for blah in blahs; do stuff; done; }; useful_function

And then calling is just C-r useful_fun, and if I need to change something I change it, and then enter and boom, new version.