Lemmy.eus
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 5 个月前

Linux Users

lemmy.ml

external-link
message-square
64
fedilink
94
external-link

Linux Users

lemmy.ml

cm0002@lemmy.world to Programmer Humor@programming.dev · 5 个月前
message-square
64
fedilink
alert-triangle
You must log in or # to comment.
  • Auli@lemmy.ca
    link
    fedilink
    English
    arrow-up
    9
    ·
    5 个月前

    Ctrl R

    • sol6_vi@lemmy.makearmy.io
      link
      fedilink
      arrow-up
      1
      ·
      4 个月前

      holy fucking shit 🤌💪🤯❤️💯

  • TabbsTheBat (they/them)@pawb.social
    link
    fedilink
    arrow-up
    4
    ·
    5 个月前

    I’ve been using ctrl + R more now :3… though I definitely used to ↑↑↑↑↑↑↑

    • sbird@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 个月前

      Woah Ctrl R looks super cool, never knew that I could do that before…

    • I_Am_Jacks_____@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      5 个月前

      check out fzf (install fzf and add (assuming bash) eval "$(fzf --bash)" to your .bashrc) Makes ctrl+r a superpower

  • dreadbeef@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 个月前

    Fish once again undefeated. If I want to find that weird image magick command I used earlier with foo.png in it I just type foo.png, hit up and its usually the first one. It doesnt matter where foo.png occurs in the command, fish will find it.

  • aeharding@vger.social
    link
    fedilink
    arrow-up
    3
    ·
    5 个月前

    The number of people who don’t reverse-I-search is too damn high

    • Derpgon@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      5 个月前

      CTRL+R for those unitiated

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 个月前

      It was quite a while before I realised that was possible.
      Then not long after starting to use it, that I got fed up and just started opening up the history file and searching in it.

      • dropcase@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        4 个月前

        why not history | grep -i and the search term?

        even if there are several, you can use ! and the command’s line number to run it again

        • ulterno@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 个月前

          history is shell dependent.

  • RedSnt 🧩♂️👓🖥️@feddit.dk
    link
    fedilink
    arrow-up
    3
    ·
    4 个月前

    I write part of the command then ctrl+r. Using FZF mind you. Such a great utility.

  • iamdefinitelyoverthirteen@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    5 个月前

    …until you press up one too many times and enter the same command but with a typo. Again.

    • AmidFuror@fedia.io
      link
      fedilink
      arrow-up
      1
      ·
      5 个月前

      Been there, done that.

    • layzerjeyt@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      0
      ·
      5 个月前

      There is an option you can set in .zshrc or .bashrc which only includes lines that exit 0 (success)

      • antimidas@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        4 个月前

        Infuriatingly that would omit things like unit test runners from the history in case they don’t pass. As a developer I tend to re-run failed commands quite often, not sure how widely that applies, though.

  • B_DL@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 个月前

    I knew there was an

    ls
    

    In there somewhere

    • teletext@reddthat.com
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      5 个月前

      ctrl + r, l, s

      Much faster than simply typing ls!

  • Edgarallenpwn@midwest.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 个月前

    I typed it once, I’m not typing it again

  • lmmarsano@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 个月前

    meme: bitches dont know bout ctrl-r
    or documentation.

    • Bash command line editing covers searching.
    • Readline library command line editing covers searching.
  • mvirts@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    5 个月前

    ^r

    • veni_vedi_veni@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      5 个月前

      and whenever you forget to sudo: sudo !!

      • Gumus@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        5 个月前

        You need this: https://github.com/nvbn/thefuck

  • pcouy@lemmy.pierre-couy.fr
    link
    fedilink
    arrow-up
    1
    ·
    5 个月前

    https://github.com/atuinsh/atuin is a great tool to manage and search your shell history. I especially enjoy it being able to search commands based on the working directory I was in when I ran them.

    It also has more features (which I don’t use) to manage dotfiles and sync shell history across hosts/devices.

  • stealth_cookies@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    5 个月前

    This is why I like atuin, I can just press up and start typing part of the command and it will likely find it in my history.

  • Yggstyle@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    5 个月前

    taptaptaptap… taptaptaptap… taptaptaptap taptaptaptap taptaptaptap

    … taptaptaptap

    … tap …

    … shit I was on a different user when I typed it.

  • merc@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    5 个月前

    Too many people still use Bash.

    • Leonardo_da_Vinci@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      5 个月前

      Too many distributions still ship with Bash.

      • rtxn@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        5 个月前

        In the real world, the only thing better than perfect is standardized.

      • merc@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        5 个月前

        Yeah, true. But, it’s easy to change.

        Bash is the Internet Explorer of shells. It’s great for installing a more useful shell.

        • Croquette@sh.itjust.works
          link
          fedilink
          arrow-up
          0
          ·
          5 个月前

          What shell do you recommend?

          • merc@sh.itjust.works
            link
            fedilink
            arrow-up
            0
            ·
            5 个月前

            I like zsh, but some people say great things about fish.

            • Auli@lemmy.ca
              link
              fedilink
              English
              arrow-up
              0
              ·
              5 个月前

              My problem with those is bash is always there and just works.

              • merc@sh.itjust.works
                link
                fedilink
                arrow-up
                1
                ·
                5 个月前

                Yes, just like Internet Explorer.

                It’s good to know how to do things in bash, since you’re going to encounter it pretty often. But, that doesn’t mean you shouldn’t customize your shell on the machine(s) you use most often. Why stick with the default when there are better options? You’re just hobbling yourself.

  • wewbull@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 个月前

    The one people see me doing that gets a “huh?” Is:

    ~$ !find
    find -type f -name '*blah*' -print0 | xargs -0 gzip
    ~$
    

    “Wait! What did you do?” “Oh. Do you not know about bang?”

Programmer Humor@programming.dev

programmer_humor@programming.dev

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: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

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

  • 616 users / day
  • 3.42K users / week
  • 8.46K users / month
  • 16.3K users / 6 months
  • 3 local subscribers
  • 29.5K subscribers
  • 1.9K Posts
  • 47.7K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.7
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org