I use control-r interactive reverse history search in zsh all day long. Just now I tried to find something I haven't used in quite some time, and it wasn't there. But when I grepped my .zsh_history file, it was there.
Is there a maximum # of history entries reverse search will search? Can I configure this?
You can configure (in your .zshrc) how long the history per session and the stored one is:
HISTSIZE=5000 # session history size
SAVEHIST=1000 # saved history
HISTFILE=~/.zshistory # history file
That is what is searched by zsh, I am not aware of a limit that reverse-history-search uses.
You might want to check on the zsh-param(1) man page.
In-memory history may not contain entries that are in the history file (if the file size limit is larger than the in-memory limit) and the history file may not contain entries that are in memory (until they're written - either explicitly or when the shell exits - subject to size limits set by environment variables). There is no other limit on reverse-history-search.
This is true in Bash and I believe the Z shell is similar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With