3 ms·
Additional tip: if you overshoot and miss the command you wanted by hitting ctrl+R too much times (as it happens sometime when looking for an older command), yo
by jaster 8y ago
Additional tip: if you overshoot and miss the command you wanted by hitting ctrl+R too much times (as it happens sometime when looking for an older command), you can go forward with ctrl+S. [EDIT: As Hikikomori pointed (thanks!), I got my shortcuts mixed up, ctrl+S is the shortcut for zsh, and the equivalent for bash is ctrl+shift+R]
(ctrl+S and ctrl+R are based on emacs shortcuts, where ctrl+S is search and ctrl+R is reverse search)
- Hikikomori 8y agoDoesn't work on GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18) ctrl+shift+r works though.
- jaster 8y agoYep you're right, I got my shortcuts between bash and zsh mixed-up. I edited my post, thanks for the correction. (Not sure why bash did not go the obvious route here, I guess they already had something on ctrl+S when they implemented forward search...) EDIT: actually, you can activate ctrl+S for search-foward on bash by using `stty -ixon`. See more info about why here https://unix.stackexchange.com/questions/141422/searching-history-in-bash-forward-after-backward https://unix.stackexchange.com/questions/141422/searching-hi...
- fnord123 8y agoctrl-s is usually for pausing the terminal (where ctrl-q resumes it). https://en.wikipedia.org/wiki/Software_flow_control https://en.wikipedia.org/wiki/Software_flow_control
- 0db532a0 8y agoNote that your terminal emulator needs to pass the ctrl+S through. ctrl+S won’t work by default in a lot of cases from personal experience.