3 ms·
Well, you can go quite far with a few simple tweaks to Ctrl+R. # disable flow control (Ctrl+S now searches forward in history) if [ -t 0 ]; then
by imp0cat 2y ago
Well, you can go quite far with a few simple tweaks to Ctrl+R.
# disable flow control (Ctrl+S now searches forward in history)
if [ -t 0 ]; then
stty -ixon
fi
And then add the partial search to arrows:
> cat .inputrc
$include /etc/inputrc
"\e[A": history-search-backward
"\e[B": history-search-forward
All that in bash.
- alextingle 2y agoHaving the partial search bound to the up/down arrows is the most fundamental part of the shell for me. I very rarely have to resort to Ctrl-R. Every few weeks I might need a more complex history search, but for that I can just grep in my .zsh_history.
- larusso 2y agoThe problem with grep for me is that it's not really interactive. fzf allows me to fuzzy search and adjust the search term and seeing a list with results I then can select from.