blugatch.tube
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
☆ Yσɠƚԋσʂ ☆@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 7 天前

Linux Users

lemmy.ml

message-square
27
link
fedilink
  • cross-posted to:
  • [email protected]
203

Linux Users

lemmy.ml

☆ Yσɠƚԋσʂ ☆@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 7 天前
message-square
27
link
fedilink
  • cross-posted to:
  • [email protected]
alert-triangle
You must log in or # to comment.
  • تحريرها كلها ممكن@lemmy.ml
    link
    fedilink
    arrow-up
    20
    ·
    7 天前

    CTRL+R

    • Fossifoo [comrade/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 天前

      Or if you are not sure what it was at all: history

  • HumanPerson@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    9
    ·
    6 天前

    You forgot a couple down arrows for when you overshoot.

  • HiddenLayer555@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    6 天前

    The command you want is in the buffered history of a still running terminal that’s doing something you don’t want to close 💀

  • Moonrise2473@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    6 天前

    Introducing: fish

    And then you just need to remember the first letters of the previously typed command

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      3
      ·
      6 天前

      Yup, I started using fish a while back and autocomplete is what kept me on it. The best part is that it’s contextual based on the folder you’re in.

    • Oriel Jutty :hhHHHAAAH:@infosec.exchange
      link
      fedilink
      arrow-up
      3
      ·
      6 天前

      Look up history-search-backward in your favorite bash/readline manual.

  • naevaTheRat@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    4
    ·
    6 天前

    Some of you haven’t read the bash manual and it shows.

    Blow your mind to know about bang patterns. You’ve used !! but do you know about !$?

  • Kras Mazov@lemmygrad.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 天前

    Don’t call me out like that lol. Also Atuin is pretty cool for this as you are showed a list of the commands used when you press ⬆️.

  • Rom [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 天前

    Why would I type out this command that’s six whole keystrokes long when I can save time by pressing ‘up’ twenty times instead?

  • krash@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    6 天前

    If you haven’t, try McFly - is a much better backwards / history search in the shell.

  • Diurnambu1e [none/use name]@hexbear.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 天前

    After a time ypu look into extending the history too… 500line by default is far too short for all the awesome commands

  • ramius345@sh.itjust.works
    link
    fedilink
    arrow-up
    17
    arrow-down
    1
    ·
    7 天前

    Ctrl-r was right there.

    • calliope@retrolemmy.com
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      7 天前

      Or sometimes history if I can’t remember at all.

      Oh my bad, two other people said that too I was just excited

  • Foster Hangdaan@lemmy.hangdaan.com
    link
    fedilink
    arrow-up
    10
    ·
    7 天前

    It’s either this or history | grep 'some-command'.

  • Nate@piefed.alphapuggle.dev
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    7 天前

    history

    !982

  • roux [they/them, xe/xem]@hexbear.net
    link
    fedilink
    English
    arrow-up
    9
    ·
    7 天前

    Me with git pushes: up up up, enter x3. Like 6 times a day.

    • naevaTheRat@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      6 天前

      Just make some aliases and scripts you lunatic.

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      8
      ·
      7 天前

      ctrl+r is your friend :)

      • Jolteon@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        6 天前

        With only three up presses, it would probably be faster than ctrl+r

      • roux [they/them, xe/xem]@hexbear.net
        link
        fedilink
        English
        arrow-up
        11
        ·
        7 天前

        Not me using Linux for 15 years and just learning you can search through previous commands…

        • isame [he/him]@hexbear.net
          link
          fedilink
          arrow-up
          2
          ·
          7 天前

          I hope I’m not blowing your mind when I tell you that you can grep .bash_history?

          • roux [they/them, xe/xem]@hexbear.net
            link
            fedilink
            English
            arrow-up
            2
            ·
            7 天前

            Easy there wizard. In my defense I don’t hang out in a terminal all that much anymore.

  • lugal@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    7
    ·
    7 天前
    ls
    
  • highduc@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    7 天前

    If you’re in this picture try using fzf and backwards search, much more effective, hell even without fzf.

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

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]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

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

  • 627 users / day
  • 1.18K users / week
  • 2.06K users / month
  • 8.11K users / 6 months
  • 1 local subscriber
  • 38.5K subscribers
  • 1.88K Posts
  • 40.4K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org