• zarkanian@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      1 day ago

      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
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        21 hours ago

        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
          link
          fedilink
          English
          arrow-up
          1
          ·
          39 minutes 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