Comment by opan

1 day ago

Some things are worth an alias, or a script, some things aren't quite worth either but you still wanna run them again in the future. I think that's where history helps. Awkward niche one-liners. Also sometimes you do something for the first time, take a bit to figure it out, then 6-12 months later it's easier to check your shell history than relearn the process from scratch again. Also sometimes you may want to run something new that's very similar to an old thing you ran, like maybe you forget which rsync args you've been using lately and you wanna use the same ones but on different files. Search up your last rsync, edit paths.

I used to start my history over with each PC, but last year when I upgraded my primary machine I decided to copy over my browser history and shell history in addition to the usual dotfiles and stuff. It's honestly been really nice and convenient. It almost feels like cheating that I can see stuff older than the machine that I did.

>Some things are worth an alias, or a script, some things aren't quite worth either but you still wanna run them again in the future

I think the bigger problem is that sometimes it's just hard to know upfront exactly what is worth an alias or a script. It may at the time seem like something you'll not need to bother with again and then it turns out a year or two later you have to deal with it a fair amount. I guess one could be in the habit of just always documenting absolutely everything and doing aliases/scripts by default but as a practical matter that's a great deal of time given that many one-liners truly genuinely are one-liners that really won't ever get used again.

Automated history recording helps fill that gap. If you find you do need something again down the road that was a certain amount of effort to figure out the first time, the second (or third or whatever your heuristic is) time is when you can make an alias or script for it. Having the history on-hand simultaneously helps give a jumping off point and helps one decide that yes, actually I better formalize this because I had to do it before on dates X, Y & Z.