Maybe not, but mine definitely have been.
Doubt this is a popular opinion but I’ve recently come to realization that while
seemingly making me more productive, my shell aliases have the potential of
making me dumb.
Don’t get me wrong, I’m still a big fan of shell aliases, but I’m also on a
quest to be more capable on the command-line. I’ve found that how I alias some
things has become a detriment to my desire to up my CLI IQ.
If you’ve perused my dotfiles, you’ve probably noticed that there’s
an overabundance of
git related shell aliases in the mix. A lot of that stems
from using Oh My ZSH! (OMZ) back in the day, specifically the
git plugin which
carried over when I switched to Antigen. My since abandoned approach to typing
less has also contributed heavily.
These aliases are amazing and solve a lot of problems for me, but they’ve put me
in a situation where, when asked how to do XYZ with
git, I usually don’t know
the answer and say something along the lines of:
I dunno, pretty sure my aliases take care of that, check my dotfiles, lol.
Great that my aliases solve problems, but terrible that I can’t function
completely without them. It’s bad enough when I have to drive and the person
ESC. Talk about rage face.
Your aliases should improve conditions, but not necessarily leave you a bumbling
fool if / when you need to help another person or even hop on their computer or
when they ask you how to do something.
After making this staunch realization that I’ve been lowing my CLI IQ while
seemingly improving my command-line quality of life (CLI QOL) I decided that I
should probably take a look at my aliases and make sure I know exactly what’s
going on with everything.
What I came to realize is not only did I not know how to do certain things
without the crutch of my shell aliases, I also wasn’t even sure what the hell
some of the stuff in my aliases was doing.
Case in point, I noticed that all of my
git-commit aliases were passing the
-v flag. At a glance it probably wasn’t shorthand for
--version and was
probably the shorthand for
--verbose. All well and good, but why? What value
was it adding?
Pretty sure this wasn’t even something a forgot and was something that I never
knew to begin with because I had lifted it from the OMZ
git plugin. This part
of why I had dropped OMZ and why I encourage the cherry picking of
things versus just bringing in all of my dotfiles
After a bit of
man page digging, I not only confirmed that
-v was in fact
--verbose and the value add was that it is the reason my editor
shows the files changed and the diff when I go to commit.
I also learned that there was also an associated
git-config variable named
commit.verbose that I could use instead. Now my
.gitconfig has another line,
all of my
git-commit aliases are a bit shorter and I’m just a little more
Now that’s not to say that I think all aliases are bad news. There are times
when you can improve your CLI QOL while not taking an IQ hit.
One of my favorites, that has saved my ass at least a few times are my aliases
to set interactive mode (
--interactive) on some commands that are
destructive to files, like copy, move and remove.
The added benefit of always running interactive mode is that when I futz
something up, like getting too aggressive with a
rm, I’m prompted and have to
confirm if I really want to do something stupid.
Sure these aliases still bury a bit of working knowledge, once that info gets
overwritten in my brain, but also provides a safety mechanism which I’m okay to
sacrifice a couple IQ points for.
Another would be aliases that add some visual sugar, like adding
grep. While nice to have, they are pretty trivial enhancements that I can live
without if I were logged into a server that didn’t have my aliases.
I’m still working to find the right balance of helpful aliases that aren’t
leaving me at a detriment in regard to my know-how.
All just part of my process of trying to improve my productivity and working