小编laj*_*rre的帖子

zsh HISTFILE - 仍然从 ~/.zsh_history 读取

我将我的$HISTFILEenv var设置为自定义的东西,我的 zsh 确实正在写入新的 histfile。

但是当使用向上箭头或其他历史搜索功能时,它仍然从 ~/.zsh_history 读取

即如果我打开一个新的外壳,然后直接按向上箭头,我会将最后一行写入~/.zsh_history:(

我使用 oh-my-zsh (with osx brew celery gem git-flow npm pip screen vi-mode last-working-dir docker),这里是我使用的 setopts:

# zsh options
#Initial
setopt appendhistory autocd beep extendedglob nomatch notify
#history
HISTSIZE=100000000
SAVEHIST=100000000
setopt HIST_IGNORE_SPACE
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 # share command history data
#dirs
setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups
setopt …
Run Code Online (Sandbox Code Playgroud)

shell command-history zsh oh-my-zsh

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

command-history ×1

oh-my-zsh ×1

shell ×1

zsh ×1