zsh can not save history. history is blank when open a new terminal.
Manjaro% export LANG=en_US.UTF-8
Manjaro% sed -e '/^#/d' .zshrc
export HISTSIZE=10000
export SAVEHIST=10000
export HISTFILE="~/.zhistory"
Manjaro% fc -AI
zsh: locking failed for ~/.zhistory: no such file or directory
Manjaro% ls -alF .zhistory
-rw-r--r-- 1 zhuxiaoxi zhuxiaoxi 0 Aug 19 14:01 .zhistory
Manjaro% history
1 export LANG=en_US.UTF-8
2 sed -e '/^#/d' .zshrc
3 fc -AI
4 ls -alF .zhistory
Manjaro% echo $HISTSIZE $SAVEHIST $HISTFILE
10000 10000 ~/.zhistory
I just solved this problem. Quotes should not be used.
export HISTFILE=~/.zhistory