this post was submitted on 24 Sep 2025
1275 points (98.2% liked)

Programmer Humor

26570 readers
2244 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

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] janAkali@lemmy.sdf.org 4 points 2 days ago* (last edited 2 days ago) (1 children)
  • zsh-autosuggestions
  • history | fzf
  • alias cat="bat --plain --theme=gruvbox-dark"
[–] zarkanian@sh.itjust.works 6 points 2 days ago* (last edited 2 days ago) (1 children)

Aliasing cat or any other ubiquitous shell utility to a replacement is a mistake. Garuda did this, and it was driving me crazy why cat was giving me errors. Turns out that they had aliased bat to cat, and since bat 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.

[–] janAkali@lemmy.sdf.org 3 points 1 day ago* (last edited 1 day ago) (2 children)

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.

[–] psud@aussie.zone 1 points 1 day ago

It's better to learn the new command, then it still works when you use a different machine that doesn't have your alias

[–] crater2150@feddit.org 2 points 1 day ago

Also, even zsh scripts don't read your .zshrc by default.