当我fc -l 1
从 shell 运行 a 时,我会从 .zsh_history 中取回完整的历史记录。当我从脚本运行相同的命令时,它只限于最后 30 个。任何想法为什么?
我有以下来自 oh-my-zsh 的 zsh 历史设置
if [ -z $HISTFILE ]; then
HISTFILE=$HOME/.zsh_history
fi
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory
setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_dups # ignore duplication command history list
setopt hist_ignore_space
setopt hist_verify
setopt inc_append_history
setopt share_history