6

有以下.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"

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

4

2 回答 2

19

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

利用:

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

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

于 2018-10-11T08:34:18.853 回答
1

我正在使用 omz 运行 zsh 5.7.1 (x86_64-apple-darwin19.0)。

HIST_STAMPS="mm/dd/yyyy"现在可以按预期工作。

于 2020-12-02T21:56:01.670 回答