• Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    28
    ·
    1 day ago

    Always amused me that sudo !! is actually more keypresses (at least on keyboards where typing ! requires holding Shift).

    • printf("%s", name);@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      52
      ·
      1 day ago

      You just blew my mind. sudo [space] [shift] !! [enter] (4+1+1+1+1+1) is one keypress longer than ↑ + home + sudo + space + enter (1+1+4+1+1). In your face, universe.

      • Logi@lemmy.world
        link
        fedilink
        arrow-up
        10
        ·
        15 hours ago

        If you have an actual home key. If it’s ctrl+a or (IIRC, AFK) ctrl+← then we’re even.

        And if we track hand movements then pressing ! twice may be faster than moving to another key.

        But yeah, it’s not at all clear that sudo !! is faster like you’d expect it to be.

    • Nilz@sopuli.xyz
      link
      fedilink
      arrow-up
      11
      ·
      1 day ago

      I use zsh with the sudo plugin. Double tap esc and your current or last command will be prefixed with sudo.