202
all 47 comments
sorted by: hot top controversial new old
[-] not_neno@lemmy.world 15 points 1 year ago
[-] Doolbs@lemmy.world 2 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 3 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

[-] Doolbs@lemmy.world 1 points 1 year ago

Thank you very much.

[-] jrandiny@lemmy.world 1 points 1 year ago

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

[-] tlf@feddit.de 1 points 1 year ago

This is it, my first saved comment on lemmy

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

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

[-] Linssiili@sopuli.xyz 1 points 1 year ago

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

[-] frank@lemmy.world 0 points 1 year ago

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

[-] nous@programming.dev 1 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.

[-] RomanRoy@lemmy.world 14 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

[-] rln@lemmy.world 9 points 1 year ago

Bro, do you even ^R ?

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

Finally the ls command!

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

Or history | grep {command}

[-] karson777@social.fossware.space 2 points 1 year ago

i have a alias for h which is history, then hg which does this and i can search my whole 52 thousand line history file and find anything i've ran

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

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

[-] luka@lemmy.world 1 points 1 year ago
[-] FarLine99@lemm.ee 0 points 1 year ago
[-] knobbysideup@lemm.ee 3 points 1 year ago

Since this post triggered hidden gems: ^old^new will substitute old with new from the last command and execute.

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

Me when configuring a switch.

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

~/.bash_history is where my documentation lives

[-] b3nsn0w@pricefield.org 1 points 1 year ago

yeah, the other day i was supposed to remove a restriction from a router that was some custom thing built on a raspberry pi. i logged in, started messing around, trying to figure out the system, and of course i looked at bash_history because why not, i'm unfamiliar with the setup so it seemed like a good place to start. up until i found some commands editing it. so i'm like

$ export HISTFILE=/dev/null # alright, two can play this game

it ended up being a simply cron job that runs a script that starts and stops hostapd every once in a while. i didn't disable the cron job, i just commented out a critical line from the stop script. happy debugging to the sysadmin, lol

[-] norgur@discuss.tchncs.de 2 points 1 year ago

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

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

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

[-] atx_aquarian@lemmy.world 1 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 1 points 1 year ago

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

[-] MeanEYE@lemmy.world 1 points 1 year ago

Easier to type history then !xx where xx is the number of record in history.

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

history | grep term

[-] jogurt@lemmy.world 1 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 0 points 1 year ago

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

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

Zsh does the same, though I think you need oh my zsh and a plugin for it.

[-] zekiz@lemmy.world 1 points 1 year ago
[-] snake@lemmy.world 1 points 1 year ago

cat .bash_history | grep keyword

But yeah pretty much.

[-] open_world@lemmy.world 0 points 1 year ago

I try to avoid the terminal as much as I humanly can because of ergonomic issues like this.

[-] amanwithausername@vlemmy.net 1 points 1 year ago* (last edited 1 year ago)

y... you do realise this is a meme, right? If you want to find a specific command that you ran in the past, you can just hit ctrl-r and search for it? No-one is actually spamming the up key, it's a joke.

[-] jcb2016@lemmy.world 0 points 1 year ago

ctrl + r then enter phrase

[-] someacnt_@lemmy.world 0 points 1 year ago

Woah. Quality of meme in this site amazes me.

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

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

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

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

this post was submitted on 01 Jul 2023
202 points (96.8% liked)

linuxmemes

21222 readers
44 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!

    founded 1 year ago
    MODERATORS