Loading

给ZSH 添加时间戳

Add the following snippet at the bottom of ~/.zshrc file.

Option 1 - Just time

RPROMPT='[%D{%L:%M:%S}] '$RPROMPT

Option 2 - Date and time


RPROMPT="[%D{%f/%m/%y} | %D{%L:%M:%S}]"

When you are done, run $ source ~/.zshrc to see the effect. If it doesn't work, quit iTerm2 and open it again.

转自:How to add timestamp on right hand side of ZSH / iTerm2 terminal prompt?

posted @ 2023-06-13 18:05  可是我爱你啊  阅读(126)  评论(0编辑  收藏  举报