At first it seemed that history-substring-search and autosuggestions were not work, but the value of $HISTFILE was not set .zhistory.
$ echo $HISTFILE
$ /Users/<user>/.zsh_history
I think this is because /etc/zshrc is loaded after upgrading macOS Catalina.
However, since this file cannot be edited by root, Can't be solved.
Command history needs to be written to .zhistory.
In addition to .zhistory, a .zsh_history file will be created.
The previous history will not be read.
Just upgrade macOS.
2873885zsh 5.7.1 (x86_64-apple-darwin18.2.0)macOS Catalina (10.15) Build: 19A583Commit 43214f1aed1723ab5b18cd73ce0019b5c6bb9848 introduced the allowance of a previously set HISTFILE value. As that variable is set in /etc/zshrc since Catalina, its value $HOME/.zsh_history takes precedence over the one used in .zprezto/modules/history/init.zsh since then.
As a workaround, add the following snippet to .zshrc just before Prezto is sourced:
#
# Workaround for: https://github.com/sorin-ionescu/prezto/issues/1744
#
export HISTFILE="${ZDOTDIR:-$HOME}/.zhistory" # The path to the history file.
Above snippet sets HISTFILE to $HOME/.zhistory which again is used in .zprezto/modules/history/init.zsh instead of the value previously set in /etc/zshrc.
Interesting. I鈥檓 not sure if we want to override this or not since was a mechanism that let users override the setting if they wanted to.
Interesting. I鈥檓 not sure if we want to override this or not since was a mechanism that let users override the setting if they wanted to.
I would prefer some setting in the history module that would allow me to configure whether any predefined value would take precedence or not. Like:
zstyle ':prezto:module:history:histfile:path' allowoverride 'yes'
Most helpful comment
Commit 43214f1aed1723ab5b18cd73ce0019b5c6bb9848 introduced the allowance of a previously set
HISTFILEvalue. As that variable is set in/etc/zshrcsince Catalina, its value$HOME/.zsh_historytakes precedence over the one used in.zprezto/modules/history/init.zshsince then.As a workaround, add the following snippet to
.zshrcjust before Prezto is sourced:Above snippet sets
HISTFILEto$HOME/.zhistorywhich again is used in.zprezto/modules/history/init.zshinstead of the value previously set in/etc/zshrc.