With ohmyzsh installed, and two plugins history
and history-substring-search
enabled, the following key binding provides the means for search for commands you've previously typed.
You can type a part of the command you're looking to use then press the up-arrow or down-arrow key on the keyboard repeatedly to search through your history for the command you need.
First make sure ~/.zshrc
includes;
plugins=(
history
history-substring-search
...ANY OTHER PLUGINS YOU USE...
)
# Bind the up-arrow key to do a history substring search
bindkey '^[[A' history-substring-search-up
# Bind the down-arrow key to do a history substring search
bindkey '^[[B]' history-substring-search-down