I’ve done something similiar to this over the years for organization purposes and not having to change much between shells except add a path. You can also add cases that check your shell and do something slightly different if needed.

  • QuizzaciousOtter@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    1 day ago

    I have never heard of anyone using aliases for anything but trivial one-liners. I don’t think people consider them as an alternative to scripts so I don’t really get the point of half of this post.

    However, the part explaining the benefits of using scripts over aliases even for trivial one-liners is pretty neat.

        • BeardedGingerWonder@feddit.uk
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 day ago

          Mostly because there’s a profile everyone sources that’s relatively straightforward to that’s straightforward to get access to. Whereas I’d never get root level access.

          • Ferk@lemmy.ml
            link
            fedilink
            arrow-up
            0
            ·
            edit-2
            16 hours ago

            You don’t need root level access though. What I usually do is stick a PATH="$PATH:$HOME/.local/bin and then place all the scripts in there.

            • BeardedGingerWonder@feddit.uk
              link
              fedilink
              English
              arrow-up
              0
              ·
              15 hours ago

              Wouldn’t that require me to have access to everyone’s home directory and need to dump the scripts in everyone’s?

              Potentially I could set up an alt bin directory everyone has access to and configure that in the shared profile, the only drawback there is it might be less obvious whats going on if something breaks and someone else needs to take a look at it.