zsh_historyは、すべてではなく一部の項目のみを表示します。

zsh_historyは、すべてではなく一部の項目のみを表示します。

理由はわかりませんが、.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

ベストアンサー1

では、あなたが所有しているすべてがデフォルトzshhistory表示されず、.zsh_history表示されてはなりません。この問題:最後の15個のコマンドのみを表示します(あなたの場合は何らかの理由で7個)。入力したいすべての項目を表示するには、history 1次を参照してください。これ

おすすめ記事