• obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      It runs the previous command with sudo, also its only for fish shell.

    • yeehaw@lemmy.ca
      link
      fedilink
      arrow-up
      9
      ·
      3 days ago

      !! Just puts in your last typed command. So if you typed rm -rf /etc, you wouldn’t have permission. But if you typed in sudo !! Right after, then you’re really fucked.

      • TrickDacy@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        3 days ago

        Ah I wasn’t clear – those, I knew. It’s alt+S I don’t know. I’m at my machine now and it doesn’t seem to do anything on Pop_OS.

        • clif@lemmy.world
          link
          fedilink
          arrow-up
          5
          ·
          3 days ago

          Seem to be a fish shell thing.

          I tested on my good ole trusty bash and got nothing so I went searching.

          EDIT: Clarification : alt+s seems to be a fish shell thing.

      • softotteep@pawb.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 days ago

        But if you typed in sudo !! Right after, then you’re really fucked.

        Not if you don’t type your password.

        • ClownStatue@piefed.social
          link
          fedilink
          English
          arrow-up
          3
          ·
          3 days ago

          Adding to this, if you notice numbers next to your previous commands when you run history, you can do !<number> and it will rerun that command. Probably the second cool shell trick I learned back in the olden days or yore (mid-90s?) after ⬆️

        • yeehaw@lemmy.ca
          link
          fedilink
          arrow-up
          2
          ·
          3 days ago

          I assume if you are silly enough to type in rm -rf /etc, then you are silly enough to type in your password 😅