command line aliases to make repeated processes quicker. I’ve used them in the past and on specific programs but never on command line utilities.

like for instance with Debian, I’m repeatedly typing sudo apt-get install, so I aliased it: alias sagi=“sudo apt-get install” and it works pretty good.

Are there any best practices or aliases to avoid when using them? Other than known commands obviously. Are there popular alias lists out there?

  • @model_tar_gz@lemmy.world
    link
    fedilink
    English
    13
    edit-2
    9 months ago

    In a big fan of the ‘fuck’ package for this. Try it out. Sudo apt install thefuck.

    edit: oops got the name wrong; been a while since I installed it. Fuck.

      • @model_tar_gz@lemmy.world
        link
        fedilink
        English
        29 months ago

        Funny. I never even thought of using thefuck in any remotely production-esque kind of way. Only for its intended use case: to save me a few keystrokes retyping some command I fucked up typing.

        • @Septimaeus@infosec.pub
          link
          fedilink
          English
          29 months ago

          Yeah I imagine that was just a simple focus issue, like typing in the wrong tmux pane or sending terminal commands while his editor was focused. I’ve done that plenty of times.

          I think it’s a fun and useful package too. If there’s a moral to that story, it’s just to treat others with respect and avoid isolating yourself by discouraging feedback. Thefuck just made the anecdote colorful enough to share lol

          (Sorry for delete btw, realized after I woke up that a few of those coworkers switched to lemmy and I never told anyone I let that bug go)