让 oh-my-zsh 'history' 显示命令日期和时间
Getting oh-my-zsh 'history' to display command date and time
.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
不起作用。
.zshrc 注释文本具有误导性。
使用:
HIST_STAMPS="%d/%m/%y %T"
分别显示日、月、年、时间。
我是 运行 zsh 5.7.1 (x86_64-apple-darwin19.0) 和 omz。
HIST_STAMPS="mm/dd/yyyy" 现在可以正常工作了。
.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
不起作用。
.zshrc 注释文本具有误导性。
使用:
HIST_STAMPS="%d/%m/%y %T"
分别显示日、月、年、时间。
我是 运行 zsh 5.7.1 (x86_64-apple-darwin19.0) 和 omz。
HIST_STAMPS="mm/dd/yyyy" 现在可以正常工作了。