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 history in zsh mostly useless.
My .zshrc
file contains the following lines:
HISTFILE=~/.zhistory
HISTSIZE=SAVEHIST=10000
setopt sharehistory
setopt extendedhistory
How can I fix zsh to make my shell history more useful?
UPDATE
If in zsh I call history 1
I get all of my history, just as I do in Bash with history
. I could alias the command to get the same result, but I wonder why does history
behave differently in zsh and in Bash.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…