zsh history is too short

前端 未结 2 1768
你的背包
你的背包 2020-12-05 04:31

When I run history in Bash, I get a load of results (1000+). However, when I run history the zsh shell I only get 15 results. This makes grepping h

2条回答
  •  自闭症患者
    2020-12-05 04:37

    #set history size
    export HISTSIZE=10000
    #save history after logout
    export SAVEHIST=10000
    #history file
    export HISTFILE=~/.zhistory
    #append into history file
    setopt INC_APPEND_HISTORY
    #save only one command if 2 common are same and consistent
    setopt HIST_IGNORE_DUPS
    #add timestamp for each entry
    setopt EXTENDED_HISTORY   
    

    this is my setting, and it work

提交回复
热议问题