by asicsp · 6y ago · 0 comments
# use up and down arrow to match search history based on typed starting text
"\e[A": history-search-backward
"\e[B": history-search-forward
I also changed couple of setting wrt Tab autocompletion: # when using Tab for completion, ignore case
set completion-ignore-case on
# single Tab press will complete if unique, display multiple completions otherwise
set show-all-if-ambiguous onJust tag commands with a # at the end
> $ complex command here # tagHere
Later use the tag with ctrl+r
I do this all the time
> ssh 127.0.0.1 # master
and I think there are some fuzzy matching options (like fzf) that can be added to ctrl+r
I have since switched to zsh. Up/down to search history, in ~/.zshrc:
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" history-beginning-search-backward
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" history-beginning-search-forward
Autocompletion in zsh is a different beast altogether :)