获取 oh-my-zsh 'history' 以显示命令日期和时间

Guy*_*Guy 4 oh-my-zsh

.zshrc有下面几行:

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
Run Code Online (Sandbox Code Playgroud)

但是取消注释并运行history不起作用。

Guy*_*Guy 15

.zshrc 注释文本具有误导性。

用:

HIST_STAMPS="%d/%m/%y %T"

分别显示日、月、年和时间。