Pe1uca's lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 11 days ago

Linux Users

lemmy.ml

message-square
90
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
237

Linux Users

lemmy.ml

cm0002@lemmy.world to Programmer Humor@programming.dev · 11 days ago
message-square
90
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
alert-triangle
You must log in or register to comment.
  • Auli@lemmy.ca
    link
    fedilink
    English
    arrow-up
    18
    ·
    10 days ago

    Ctrl R

    • sol6_vi@lemmy.makearmy.io
      link
      fedilink
      arrow-up
      1
      ·
      9 days ago

      holy fucking shit 🤌💪🤯❤️💯

  • TabbsTheBat (they/them)@pawb.social
    link
    fedilink
    arrow-up
    12
    ·
    11 days ago

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

    • I_Am_Jacks_____@sh.itjust.works
      link
      fedilink
      arrow-up
      5
      ·
      11 days ago

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

    • tyler@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      11 days ago

      Ctrl + r with fzf and you’ll never go back.

    • sbird@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 days ago

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

  • B_DL@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    9
    ·
    11 days ago

    I knew there was an

    ls
    

    In there somewhere

    • teletext@reddthat.com
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      11 days ago

      ctrl + r, l, s

      Much faster than simply typing ls!

    • inktvip@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      0
      ·
      11 days ago

      ls … enter ↑ enter ↑ enter

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 days ago

        You may consider using watch ls

        • inktvip@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          1
          ·
          10 days ago

          I can’t even keep apart ls and cd it seems.

  • aeharding@vger.social
    link
    fedilink
    arrow-up
    8
    ·
    10 days ago

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

    • Derpgon@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      10 days ago

      CTRL+R for those unitiated

    • Everyday0764@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      10 days ago

      reverse-i-search + fzf = <3

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 days ago

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

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

          history is shell dependent.

  • Edgarallenpwn@midwest.social
    link
    fedilink
    English
    arrow-up
    8
    ·
    10 days ago

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

  • iamdefinitelyoverthirteen@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    11 days ago

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

    • layzerjeyt@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      10 days ago

      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
        3
        ·
        10 days ago

        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.

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

          Oh, stuff like git diff and git log will end up being omitted pretty often.
          And a lot of times, the commands that end with piping into less

    • AmidFuror@fedia.io
      link
      fedilink
      arrow-up
      1
      ·
      10 days ago

      Been there, done that.

  • RedSnt 👓♂️🖥️@feddit.dk
    link
    fedilink
    arrow-up
    4
    ·
    9 days ago

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

  • dreadbeef@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 days ago

    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.

  • UnfortunateShort@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    11 days ago

    fish has “directory-aware” autocomplete with inlay hints and a fantastic history command. I do not suffer from such weakness

  • lmmarsano@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    11 days ago

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

    • Bash command line editing covers searching.
    • Readline library command line editing covers searching.
  • ѕєχυαℓ ρσℓутσρє@lemmy.sdf.org
    link
    fedilink
    arrow-up
    3
    ·
    11 days ago

    In fish, you can enter part of the command, and then press up to search for it. It’s kinda awesome.

    • RedSnt 👓♂️🖥️@feddit.dk
      link
      fedilink
      arrow-up
      2
      ·
      9 days ago

      That’s what I do in bash except for pressing up it’s ctrl+r. FZF does the fuzzy finding for me. It’s so convenient.

  • mvirts@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    11 days ago

    ^r

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

      and whenever you forget to sudo: sudo !!

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

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

    • bandwidthcrisis@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      11 days ago

      Ctrl-r, l ctrl-r, ctrl-r, ctrl-r, ctrl-r, ctrl-r, ctrl-r, ctrl-r, ctrl-r. To get ls.

  • pcouy@lemmy.pierre-couy.fr
    link
    fedilink
    arrow-up
    2
    ·
    11 days ago

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

    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.

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

    I just use mcfly

    • xoggy@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 days ago

      Not sure I understand the point of mcfly. zsh and fish have this functionality built in, where pressing Up with a command partially typed will give auto-completions to that partial match.

      • MashedTech@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        9 days ago

        Yeah. I also use auto-completions for that. McFly does fuzzy finding and because it’s a different separate db, for me it works better across many sessions to find commands I had just recently used in another session.

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.

  • 1.55K users / day
  • 4.34K users / week
  • 7.23K users / month
  • 18.8K users / 6 months
  • 1 local subscriber
  • 26.6K subscribers
  • 1.77K Posts
  • 66.1K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org