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.
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.
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
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.
Hey! Sorry just getting into Linux, I love learning about cool ways of doing things more efficiently. What does this do exactly? I've noticed others mentioning CTRL+R and I am not sure what that means either. Thank you!
Basically, while ctrl+r is nice, this is how I got used to use my system. What this does is enable search for when you press arrow up. If you type nothing then it’s default behavior but if you type “ssh” and then start pressing arrow up it will bring up the previous command that had the word ssh in. It’s worth it for someone who constantly forgets ctrl+r exists
Friendly Interactive SHell. I also use it, and I find some of the extra features delightful. I don't think it's POSIX compliant if you're one of the two dozen people who have to worry about that for your use case.
Fish Shell - Friendly Interactive Shell. It has tons of themes and customizable prompts, but most importantly it scans through your command history and autocompletes previous commands. You can even to back through previous versions of a certain command for example I copy a couple different files a lot so I'll type 'cd' then press up to get to the specific command I need. It'll also autocomplete command names if they're in the path. It's a life changer for sure
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.
I feel this in my soul. Or when you realize you're hitting up up up up to find something trivial like ls and it would have been more efficient to just type ls. LOL.