• Fillicia@sh.itjust.works
      link
      fedilink
      arrow-up
      35
      ·
      3 months ago

      I really like this comic. Just in case someone didn’t know in Linux you can:

      -Ctrl + r to search previous commands

      Or

      -type history and precede the command number by an exclamation (!) to repeat the command (I.e. “!13”)

  • dejected_warp_core@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    3 months ago

    There is an advantage to this approach though: fewer errors. You’re plucking a known working command from a list instead of manually typing a (possibly) broken version of it. Worse yet is when it’s a command where typematic mistakes cause unintended side effects like data loss. So, mashing up 100 times can be pretty smart, especially if you’re not a great typist.

  • xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    7
    ·
    3 months ago

    Sorry, do you not keep sql scratch files around?

    If deving on the cli name and save to separate files your reusable queries…

  • billy@catata.fish
    link
    fedilink
    English
    arrow-up
    4
    ·
    3 months ago

    Can’t find the info atm but if you setup inputrc to use vim controls you can use the vim search in psql.

  • Varyk@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    3 months ago

    I definitely do this with terminal commands, because I’m not hunting for whatever the specific command line to animate my gif wallpaper is.

      • Varyk@sh.itjust.works
        link
        fedilink
        arrow-up
        10
        ·
        edit-2
        3 months ago

        HOLY SHIT.

        hahahaha, thank you. oh my gosh.

        This is the most significant terminal hotkey I’ve learned in months.

        ♪⁠┌⁠|⁠∵⁠|⁠┘⁠♪

          • Varyk@sh.itjust.works
            link
            fedilink
            arrow-up
            5
            ·
            edit-2
            3 months ago

            Thanks, someone told me how to acess the old-school emotiocns recently and i like them.

            I Like THEM!

            (⁠ノ⁠°⁠_⁠o⁠)⁠ノ⁠⌒⁠┫⁠ ⁠┻⁠ ⁠┣⁠ ⁠┳

      • Varyk@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        did you know about the ctrl+r command so you can search logged commands by keyword!

        magic lobster party told me about it and it’s amazing!

        I had no idea that was a function until now.

  • hex@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    3 months ago

    At work, was recently working on a script that alters the repo significantly. Every time I tested the script, I used the up arrow to get the git clean and git checkout HEAD -- files commands to reset the repo. I must’ve used those 100+ times.