573
top 50 comments
sorted by: hot top controversial new old
[-] not_neno@lemmy.world 63 points 1 year ago
[-] Doolbs@lemmy.world 9 points 1 year ago

Holy Crap. I have gotten into the arrow up mode. Then I went to History.

But, but, but ctrl + r. Holy crap.

Thank you kind sir or madam.

[-] nous@programming.dev 8 points 1 year ago

If you enjoy that, then let me introduce you you fzf - a fuzzy finder that has support for replacing ctrl + r in shells with fuzzy matching. Among other uses.

https://github.com/junegunn/fzf#key-bindings-for-command-line

[-] not_neno@lemmy.world 4 points 1 year ago

Man I over use it at work - even when sitting in front of a pwsh prompt

load more comments (1 replies)
[-] jrandiny@lemmy.world 8 points 1 year ago

You can also install https://github.com/dvorka/hstr to supercharge your ctrl+r

[-] Skuldugery@feddit.de 3 points 1 year ago

I can recommend fzf since it also supports searching the current directory

load more comments (1 replies)
[-] frank@lemmy.world 5 points 1 year ago

Is there a MacOS versión of this? Asking for a friend.

[-] nous@programming.dev 7 points 1 year ago

It's the same, ctrl + r. It is a bash/shell thing so works on any os that uses bash or similar shells. Note, it is not the command key, but ctrl, unlike a lot of other shortcuts on macos.

load more comments (1 replies)
[-] Linssiili@sopuli.xyz 3 points 1 year ago

Fish gang arise (no need for ctrl+r, just press up)

[-] RomanRoy@lemmy.world 30 points 1 year ago

Ctrl R > start typing

You're welcome to have your life changed

[-] Contend6248@feddit.de 2 points 1 year ago

What the actual.... Thanks

[-] kentaromiura@feddit.it 24 points 1 year ago

Finally the ls command!

[-] jg1i@lemmy.world 17 points 1 year ago
load more comments (3 replies)
[-] jcb2016@lemmy.world 17 points 1 year ago

ctrl + r then enter phrase

[-] MinusPi@lemmy.fmhy.ml 15 points 1 year ago

Up up up up up up up up up oh wait down

[-] luka@lemmy.world 4 points 1 year ago
[-] FarLine99@lemm.ee 3 points 1 year ago
[-] kenoh@lemm.ee 8 points 1 year ago

ctrl+p gang RISE UP

[-] gnuplusmatt@aussie.zone 7 points 1 year ago

~/.bash_history is where my documentation lives

load more comments (1 replies)
[-] drcouzelis@lemmy.zip 6 points 1 year ago

Time to up your game with Ctrl + R reverse search! 🤓

load more comments (2 replies)
[-] norgur@discuss.tchncs.de 6 points 1 year ago

cat /var/www/vhosts.d/l[tab]o[tab]l[tab]a[tab]...

[-] 0x4E4F@sh.itjust.works 3 points 1 year ago
[-] norgur@discuss.tchncs.de 6 points 1 year ago

cat /var/www/vhosts.d/lolanotherfilehasthesamenamebutwith1.conf

load more comments (1 replies)
[-] someacnt_@lemmy.world 6 points 1 year ago

Woah. Quality of meme in this site amazes me.

[-] 0x4E4F@sh.itjust.works 3 points 1 year ago

It's more or less like on reddit, but less users.

[-] unstable_confusion@lemmy.fmhy.ml 7 points 1 year ago* (last edited 1 year ago)

It's more or fewer like on Reddit, but with less users.

[-] imnotneo@lemmy.world 4 points 1 year ago

ah there's my password...

[-] CriticalMiss@lemmy.world 4 points 1 year ago
  1. vim ~/.inputrc
  2. Paste the following:

"\e[A": history-search-backward "\e[B": history-search-forward

Thank me later

[-] GuyWithLag@lemmy.world 2 points 1 year ago

Man, I've been on unix systems since, oh, 1994, but I've never messed with my .inputrc ... may need to take the dive....

load more comments (3 replies)
[-] azvasKvklenko@sh.itjust.works 4 points 1 year ago

And the command is something like ls -l 👍

load more comments (2 replies)
[-] polite_cat@lemmy.world 4 points 1 year ago

Ctrl+R together with fzf makes this obsolete

load more comments (3 replies)
[-] atx_aquarian@lemmy.world 4 points 1 year ago

Y'all know about ctrl-r to search history, right? I went for so many years without even thinking to look for something better than up-arrow, so I have to mention it.

[-] amanwithausername@vlemmy.net 4 points 1 year ago

Wait until they learn that you can ctrl+u when you mistyped your password in sudo instead of spamming backspace...

load more comments (5 replies)
[-] rambaroo@lemmy.world 3 points 1 year ago

history | grep

Does the job well if the key combo doesn't work.

load more comments (2 replies)
[-] snake@lemmy.world 4 points 1 year ago

cat .bash_history | grep keyword

But yeah pretty much.

[-] 1337@lemmy.world 5 points 1 year ago

Why not just history | grep keyword then? Works in any directory.

load more comments (2 replies)
[-] anthimatter@lemmy.world 4 points 1 year ago

Guilty. Even knowing better ways laziness wins. Skyrim console too.

[-] jogurt@lemmy.world 3 points 1 year ago

I usually do ctrl+r but with zsh I can type the beginning of the command and press up and it will search that way too.

[-] 0x4E4F@sh.itjust.works 2 points 1 year ago

fish automatically searches as you type, just start typing and press -> when you find the command you need.

[-] CheemsBread@lemmy.world 3 points 1 year ago

esc + k for me! (vi for life)

[-] bappity@lemmy.world 3 points 1 year ago

no I don't want to write the single word command out again I'd rather go up the history with more keypresses

[-] corvett@lemmy.world 3 points 1 year ago

history | grep term

[-] voidf1sh@lemm.ee 2 points 1 year ago

Fish finally broke me of this habit, and now it's one of the first things I install on any system

load more comments (5 replies)
[-] veng@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

history | grep {some part of command}

Much more useful for going further back, even without grep.

[-] mazkarth@lemmy.world 2 points 1 year ago

As some one who SSH's from a phone to run Docker containers and will be moving the container volumes to a different location, I thank you for this lovely command.

load more comments
view more: next ›
this post was submitted on 01 Jul 2023
573 points (97.8% liked)

linuxmemes

21282 readers
880 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • 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.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 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. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    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 fork-bomb your computer.

    founded 1 year ago
    MODERATORS