this post was submitted on 24 Sep 2025
1277 points (98.1% liked)
Programmer Humor
26629 readers
2355 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
history | fzf
alias cat="bat --plain --theme=gruvbox-dark"
Aliasing
cat
or any other ubiquitous shell utility to a replacement is a mistake. Garuda did this, and it was driving me crazy whycat
was giving me errors. Turns out that they had aliasedbat
tocat
, and sincebat
is a different program, it didn't work in exactly the same way, and an update had introduced some unexpected behavior.Drop-in replacements are dumb. Just learn to use a different command.
I think it's ok to add this in a personal
.zshrc
, not on a distro level:If it breaks something - I'd probably know why and can easily fix it by removing alias/calling cat directly.
Also, scripts almost always use bash or sh in shebang, not zsh. So it only triggers if I type
cat
in terminal.It's better to learn the new command, then it still works when you use a different machine that doesn't have your alias
If you are me, there is no brain space for remembering new commands. I can already barely hold on to few dozens that I use often. And occasionally when I need "that one that does that niche thing... how was it?" program - I just sit there sifting through logs for couple minutes.
Today it was
od
(tbh it'sod
almost half the time; not really the best name to memorize (I really need to make a note or something, so I stop forgetting it, lol))Also, for this reason I went to great lengths to keep my
~/.zsh_history
protected from being randomly deleted/overwritten by mistake, as it happened a couple of times. Currently it's sitting at around 30_000 lines, oldest command is 2 years old.Also, even zsh scripts don't read your .zshrc by default.