• Multiplexer@discuss.tchncs.de
        link
        fedilink
        arrow-up
        52
        ·
        edit-2
        11 小时前

        Lets you easily and interactively search your command history.
        Half the stuff I do is usually preceded by that, it’s really useful!

        • Jack@slrpnk.net
          link
          fedilink
          arrow-up
          91
          ·
          15 小时前

          Oh that is nice, I usually use ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

          • groet@feddit.org
            link
            fedilink
            arrow-up
            6
            ·
            14 小时前

            Yeah standard bash Ctrl+r is just so painful. I much rather use “history | grep searchtearm” than that awfull search. fzf is a whole other level. But nowadays I just use fish shell which IMO has even better search than fzf

        • ulterno@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 小时前

          I have been suggested alternative programs to install to work with Ctrl+r, which are supposed to work better, but I just end up using kwrite ~/.bash_history when Ctrl+r fails.

    • alias_qr_rainmaker@lemmy.worldOP
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      16 小时前

      dude holy shit that is AWESOME! i had something similar, but it was a custom function.

      srch() { cat ~/.bash_history | grep -Ein “$@”}

    • neidu3@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      6
      ·
      16 小时前

      I accidentally stumbled across Ctrl+r over a decade ago and I still don’t understand properly how it works. So I usually egrep -e someInsaneRegex ~/.bash_history

      • ∃∀λ@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        7 小时前

        The part of the tech stack that handles all these command editing and navigation shortcuts is the readline library. Check out man readline. There’s an entire section on searching. readline is used for lots of other interpreters, too.

      • FishFace@piefed.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        14 小时前

        That is worth it for more complicated things like, “I want all commands that started with git and contained ‘foo’”

        • Prunebutt@slrpnk.net
          link
          fedilink
          arrow-up
          7
          ·
          edit-2
          15 小时前

          If you install a fuzzyfinder, like fzf, or skim, you get previews of the search query result and fuzzy search, which is really cool, too.

        • crater2150@feddit.org
          link
          fedilink
          arrow-up
          1
          ·
          2 小时前

          I used fzf before atuin, and it works pretty similar, but atuin has a few additional features, as it tracks more information than the normal shell history. For example, you can also search only for commands that you executed in the current directory (great for stuff that is project specific). Or, if you use the history syncing feature, you can toggle search for commands you executed on either any or only the current machine.