3 ms·
An alternative perspective for consideration: The very act of remembering something embeds it deeper into memory versus control-r "something", oh yeah that, en
by mdaniel 3y ago
An alternative perspective for consideration:
The very act of remembering something embeds it deeper into memory versus control-r "something", oh yeah that, enter. I'm cognizant that this is roughly the same argument as "google is making us dumber" which it's just "for your consideration" and not an axiom
And shell is one of those DSLs folks speak so highly of, in that one can build up a vocabulary that is meaningful to you, or your team, or your line of business in ways that "here's my .bash_history good luck" type sharing doesn't. Most good unix-y tools support hooks based on the script name to extend common systems with other verbs: brew, git, kubectl, and likely more
So, if one needs to remember the 5 distinct commands to cut a release, why not put them in .gitlab/scripts/run-release versus "oh, I think Jane runs that, ask her to look in her shell history"
Merely as a bit of ancedata, I have two forms of shell history suppression: $(ln -sf /dev/null .bash_history) and the almighty $(export HISTIGNORE=both) which allows me to prefix commands with a space in order to keep them out of even the local shell session's history. I am pretty disciplined about doing it for destructive commands so the inadvertent up-arrow+enter doesn't go off the rails
I've also had great luck with "poor person's dry run" as in
N=echo
for i in ...; do
$N something destructive "$i"
done
eyeball the output, then N="" and run it for reals
- eternityforest 3y agoRight now I use Makefiles for most everything. I can always type make <tab> and see what commands are available in that repo. If I'm using the shell in any nontrivial way after things are set up, that's an issue I need to fix. If there's commands I don't want to fully hide, that people may want to customize, I put them in the readme and usually copy and paste from there.
- silverquiet 3y agoI do the same thing. In fact I was telling a colleague that I've always thought it was a good idea, but I always do it since I watched a bad bash loop end a person's employment. I felt like that was the kind of war story that has me well on my way to being a greybeard.