Now if you had to guess how often I remember that there is a keyboard shortcut that does this, but don't remember what it is, and do remember that I can just press up 30-70 times...
you can hit it again after you are dialed in as much as you want and it will keep going back in time with the words you have in there and stuff that matches!
This is my approach, and for those who don't know, you can use those line numbers that come back from history to rerun the command. Like if your output is something like this:
$ history | grep tmp
501 ls /tmp
502 history | grep tmp
Wait until you learn about ctrl-R to search the bash history... :) If you press that and start typing, you will get auto complete from previous commands you typed. This is how an experienced linux user can be so fast in the terminal.
There are even better tools for this, so ctrl R is just the built in way. Later you should look into https://github.com/junegunn/fzf
grep is sooo useful. Combined with piping commands it can do some really powerful stuff. I didn't really understand a lot of these commands until I took a Linux class at my local community college. That helped a lot.
Yeah it's great how ctrl-r is kinda the default instead of something you have to go out of your way to use. Just start typing a command and the up arrow will only cycle through history that matches what you've typed so far.
Idk exactly what plugin it is, but zsh + oh my zsh has exactly this same thing. So hard to live without now that I'm used to it. Probably my favorite feature
Yeah it's great how ctrl-r is kinda the default instead of something you have to go out of your way to use. Just start typing a command and the up arrow will only cycle through history that matches what you've typed so far.
Yeah it's great how ctrl-r is kinda the default instead of something you have to go out of your way to use. Just start typing a command and the up arrow will only cycle through history that matches what you've typed so far.
I rarely use fuzzy finder to search up the commands that I'm going to use. If you realise that a certain command with arguments is often being used, you should create an alias for it so that you don't have need that memory load. That being said, I appreciate shell like fish provides auto complete (derived from command history) to speed up my workload.