我不知道为什么,但 .zsh_history 仅显示一些条目而不是全部。
shirish@debian ~ % history
155 zless changelog.Debian.gz
156* torbrowser-launcher
157* apt-cache rdepends libsdl1.2debian
158* hg clone https://bitbucket.org/allacrost/allacrost
160 cd Videos
161 history | grep apg
162 history | less
这就是 .zshrc 中的内容 -
% cat .zshrc
# Set up the prompt
autoload -Uz promptinit
promptinit
prompt adam1
setopt histignorealldups sharehistory
# Use emacs keybindings even if our EDITOR is set to vi
bindkey -e
# Keep 10000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.zsh_history
# Use modern completion system
autoload -Uz compinit
compinit
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
eval "$(dircolors -b)"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
我确实打开了几个 VTE(虚拟终端仿真器)或 zsh 选项卡。也许我错过了一个技巧或其他什么。
除记录条目数量发生变化外,其他均采用默认值。
我正在 Debian 测试并使用 zsh 版本 -
% zsh --version
zsh 5.4.2 (x86_64-debian-linux-gnu)
更新-这就是它所说的-
~ % ls -l ~/.zsh_history
-rw------- 1 shirish shirish 6451 Jan 5 20:59 /home/shirish/.zsh_history