Are you using shell aliases enough?

yujiri8 profile image Ryan Westlund ・1 min read

One thing I don't really understand about Unix is why the basic commands are all two letters instead of one. Why should I have to type "l s" just to see the dir listing? That's absurd, nobody has time to press that many keys. It should be called l.

And "c d". That's just nonsense. Not everything has to be an acronym. It should be called "g" for "go".

I don't know why it took me so long after I found out about shell aliases in my teenage years, but really, there's no design excuse for making common commands 2 letters when few or none of the 1-letter possibilities are used. They should all be used. I can't overstress how much happier and more productive I am to type:

this instead of for
l ls list
g cd; l go
u g .. up
b prevd; l (these two are fish-specific) back
f nextd; l forward
r cat read
d rm delete
n mv name
e nano edit
c cp
i stat info
t file type
h man help
s less scroll
k kill
p python
st grep search text
sf find search file
gits git status

And many others. Join me and together we can rule the shell as alias and... um... expandee?

Posted on Jan 20 by:

yujiri8 profile

Ryan Westlund


I'm a programmer, writer, and philosopher. My Github account is yujiri8; all my content besides code is at yujiri.xyz.


markdown guide

Oh my zshell has a lot of really good aliases, gst for git status, gl for git pull, gp for git push, etc. Highly recommend taking a look.



I just want to say that the day after I read this I did reduce my git aliases (gts for status, gtl for log, gtd for diff, gtu for add -u), and already I'm feeling the gains so much. Every time I do an impulsive gts, I'm something like a whole 0.1 seconds faster! Thanks for the pointer :D


Ooh, now I feel like a hypocrite for making my git aliases longer than that 🤔. I couldn't do all the git aliases like that though, since gc is something else, and it's a little iffy to have them inconsistent. I haven't aliased most of the git commands besides status, log, and commit, cause I don't use pull and push very often (not even once a day). I plan to alias switch and checkout once I learn more about the difference between them (I'm still kinda confused cause they can be used in place of each other in a lot of situations but not all).