by Grimburger · 2y ago · 0 comments
# history-search-backward / history-search-forward bound to the up and down arrows
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char
set show-all-if-ambiguous on
set completion-ignore-case on
Will search through anything matching what you've already entered. Type something like "gr" and scroll up or down to see all your previously used grep commands.
Saw this long ago on here and it's on every machine I use now, can't live without it. Thankyou to whoever originally posted it. # tsch-style history search esc-n/esc-p
bindkey '\ep' history-beginning-search-backward
bindkey '\en' history-beginning-search-forward
If I need substrings or searching for something further back in time I just use `history -99999 | rg`Tried ctrl-r bash style for about a month back when I was switching off of tcsh and hated it.