Until recently I used Ctrl+R to search for recent commands in my terminal which uses the
zsh shell. The search included commands from previous sessions which were saved in my
Now when I use Ctrl+R it only searches commands from the current terminal session and does not search in the
~/.zsh_history file. I have also notices that the
~/.zsh_history file is no longer being updated.
How do I fix this?
I have tried adding the following to my
.zshrc file but it has made no difference:
HISTFILE=~/.zsh_history HISTSIZE=10000 # Save most-recent 1000 lines SAVEHIST=10000 # Save most-recent 1000 lines bindkey -v bindkey '^R' history-incremental-search-backward
.zshrcto your question. It's impossible to solve without that.