3 ms·
What are some tips on effeciently searching through it? ctrl+r to search history and ctrl+r again for cycling backwards is an obvious one, but there doesn't see
by craftyguy 8y ago
What are some tips on effeciently searching through it? ctrl+r to search history and ctrl+r again for cycling backwards is an obvious one, but there doesn't seem to be an obvious way to cycle forwards (e.g. I accidentally passed a line in a search that I wanted).
- yrro 8y agoCtrl-S searches forward (but only if you run stty -ixon first).
- u801e 8y agoctrl+s will cycle forwards, but it's normally bound to turning flow-control off in the terminal (which means that it won't update the display in response to keystrokes).
- jimpudar 8y agoIf you are searching for something, you can always do something like this: history | grep 'keyword' | less This is usually more effective for me than C-r.
- ChrisGranger 8y agoFor quite a while now, I've been using fzf[1]. Among other things, it replaces Ctrl-R and allows you to fuzzy search your command history. I almost can't imagine not having it now... [1] https://github.com/junegunn/fzf https://github.com/junegunn/fzf
- craftyguy 8y agoHuh. I had no idea fzf did history too. I will have to give this tool another look. edit: wow, this is GREAT. thank you!
- ChrisGranger 8y agoAlt-C is another feature I like. Fuzzy find directories to cd into. I'm a bit of a fanboy at this point.
- ikornaselur 8y agoOh! This is awesome, I've been doing ctrl+t, fuzzy finds files, then just erasing the file name at the end. This is so much much better. Though, normally I use autojump to traverse around, this is really helpful when you're searching for a folder in somewhere you haven't been before or in a while (autojump uses your history).