Reputation: 115
I am using zsh 4.3.6. I would like to have the timestamp in the command line history. The history -i
always shows the current time:
> history -i
498 2020-04-27 14:54 history -i
499 2020-04-27 14:54 cat ~/.zsh_history
500 2020-04-27 14:54 exit
It seems that the timestamp is not stored in the $HISTFILE
:
> cat $HISTFILE
ls
zsh --version
history -i
How can I have the persistent command line history timestamp?
Thanks.
Upvotes: 3
Views: 4412
Reputation: 443
setopt EXTENDED_HISTORY # puts timestamps in the history
or
setopt extendedhistory
to ~/.zshrc
Upvotes: 3