Campfyre
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
alias_qr_rainmaker@lemmy.world to linuxmemes@lemmy.world · 2 days ago

Seriously, why?

lemmy.world

message-square
95
fedilink
419

Seriously, why?

lemmy.world

alias_qr_rainmaker@lemmy.world to linuxmemes@lemmy.world · 2 days ago
message-square
95
fedilink
  • Multiplexer@discuss.tchncs.de
    link
    fedilink
    arrow-up
    63
    ·
    2 days ago

    interesting, didn’t know that… Will try!

    Finding out about “Ctrl-r” also was a gamechanger.

    • Sibbo@sopuli.xyz
      link
      fedilink
      arrow-up
      29
      ·
      2 days ago

      What does CTRL+R do?

      • Multiplexer@discuss.tchncs.de
        link
        fedilink
        arrow-up
        52
        ·
        edit-2
        2 days ago

        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
          95
          ·
          2 days ago

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

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

            That’s part of the natural progression. Can’t remember if that comes before or after “history | grew command.”

        • chtk@sh.itjust.works
          link
          fedilink
          arrow-up
          17
          ·
          2 days ago

          Adding fzf to the mix makes Ctrl+r even better.

        • 6️⃣9️⃣4️⃣2️⃣0️⃣@lemmy.world
          link
          fedilink
          English
          arrow-up
          6
          ·
          2 days ago

          Just wait until you discover fish/zsh autosuggestions.

          • TurboWafflz@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            2 days ago

            As annoying as using a non-posix compatible shell sometimes is, fish saves me so much time

        • ulterno@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          2 days ago

          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.

    • farcaller@fstab.sh
      link
      fedilink
      arrow-up
      12
      ·
      2 days ago

      Next step is discovering atuin! https://atuin.sh/

      • Maestro@fedia.io
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        I love atuin!

      • naeap@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        2 days ago

        Thanks!
        Haven’t heard that one before. Comes on my growing list of all the stuff I wanna try/setup…

    • neidu3@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 days ago

      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
        3
        ·
        1 day ago

        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
        ·
        2 days ago

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

      • Multiplexer@discuss.tchncs.de
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        Did it like that before, but Ctrl-r is typically just a lot faster.

        • Prunebutt@slrpnk.net
          link
          fedilink
          arrow-up
          6
          ·
          edit-2
          2 days ago

          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.

    • SeductiveTortoise@piefed.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      2 days ago

      Ctrl+r is cool, but atuin is oh my gosh great

      https://atuin.sh/

      • tetris11@feddit.uk
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        isn’t that just fzf with ctrl-R binding

        • SeductiveTortoise@piefed.social
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 days ago

          I didn’t know fzf yet. Neat

    • alias_qr_rainmaker@lemmy.worldOP
      link
      fedilink
      arrow-up
      5
      arrow-down
      3
      ·
      edit-2
      2 days ago

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

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

      • Korthrun@lemmy.sdf.org
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        2 days ago

        Did you know that grep can take the name of the file(s) you want it to search as the final arguments?

        For example: grep -Ein "$@" ~/.bash_history

        • alias_qr_rainmaker@lemmy.worldOP
          link
          fedilink
          arrow-up
          3
          arrow-down
          2
          ·
          1 day ago

          i always pipe into grep so sometimes i forget that’s even an option, lol

linuxmemes@lemmy.world

linuxmemes@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Hint: :q!


Sister communities:
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like “every user of thing”.
  • Don’t get baited into back-and-forth insults. We are not animals.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don’t come looking for advice, this is not the right community.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures

We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.

  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t remove France.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.98K users / day
  • 4.06K users / week
  • 7.17K users / month
  • 17.4K users / 6 months
  • 1 local subscriber
  • 28.4K subscribers
  • 1.96K Posts
  • 105K Comments
  • Modlog
  • mods:
  • Kevin@lemmy.world
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.7
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org