ctrl + r
gangHoly 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.
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
Thank you very much.
Man I over use it at work - even when sitting in front of a pwsh prompt
pwsh with nushell is pretty good
You can also install https://github.com/dvorka/hstr to supercharge your
ctrl+r
I can recommend fzf since it also supports searching the current directory
This is it, my first saved comment on lemmy
Is there a MacOS versión of this? Asking for a friend.
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.Finally the ls command!
Fish gang arise (no need for ctrl+r, just press up)
Ctrl R > start typing
You’re welcome to have your life changed
What the actual… Thanks
Finally the
ls
command!Up up up up up up up up up oh wait down
you allllways overshoot
Based
Bruh. Ctrl-r
you’re amazing, this is going to change how I use fish
Or the history substring search plugin for zsh showing inline history as you type, like fish.
ctrl + r then enter phrase
With fzf!
I haven’t been on linux in a while but i remember using a file manager that had fuzzy finder and it was nice. I miss linux actually. oh well!
~/.bash_history is where my documentation lives
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
Bro, do you even
^R
?cat /var/www/vhosts.d/l[tab]o[tab]l[tab]a[tab]…
lola 🤨?
cat /var/www/vhosts.d/lolanotherfilehasthesamenamebutwith1.conf
Oh 🤣🤣🤣
ctrl+p gang RISE UP
Time to up your game with Ctrl + R reverse search! 🤓
Oh, and Ctrl + Shift + R brings you back in the search, niiiiice.
Thank you kind stranger 👍 ☺️.
Look up fzf for luxury treatment
Woah. Quality of meme in this site amazes me.
It’s more or less like on reddit, but less users.
*fewer
It’s more or fewer like on Reddit, but with less users.
Or
history | grep {command}
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
cat .bash_history | grep keyword
But yeah pretty much.
Why not just
history | grep keyword
then? Works in any directory.You know you don’t actually have to do cat 😂. But yeah, I know, I do it as well 🤣.
Yeah, I grep on history and then !<number> to execute the line I want
ah there’s my password…