Short link to this: caseywatts.com/bashautocomplete
Other gists & tricks: http://caseywatts.com/gists-and-tricks
So you typed something into the terminal before and you wanna bring it up now? Once that code above is in your .inputrc (for bash) or your .zshrc, then try it out:
- type the
first few characters of the thing
(fortunately you remember how it started) - press the
up
arrow key. ✨ the most recent command that starts with those letters shows up ✨ up
again to cycle back further- press
down
to go back one :)
(there's a related thing called reverse-i-search
that you can do with ctrl+r
(see here) but I definitely don't like it as much b/c you can't cycle up and down, just in one direction~)
I think reverse search works as ctrl+r in one direction and ctrl+shift+r in the other direction