I am running Mojave have changed default shell from bash to zsh. I notice history is not saved between sessions.
Following recommendations in What are the practical differences between Bash and Zsh? I ran :
autoload -U zsh-newuser-install zsh-newuser-install
This created the files
~/.histfile which I did not have before but the history seems not to be updated.
A1398% cat .zshrc # Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=1000 SAVEHIST=1000 setopt beep bindkey -e # End of lines configured by zsh-newuser-install # The following lines were added by compinstall zstyle :compinstall filename '/Users/hali/.zshrc' autoload -Uz compinit compinit # End of lines added by compinstall A1398% cat .histfile A1398%
On opening a new session (either Terminal or iTerm2) there is nothing previous and up arrow for previous commands does nothing.
Do I understand correctly and history should be in
~/.histfile? Are there any other required steps?