Linux: zsh Prompt Setup
Add date time and color to zsh prompt.
# user host datetime path $ or # PROMPT="%F{red}%n@%m %D{%Y-%m-%d %H:%M:%S} %d %#%f "
Put the lines in
/Users/xah/.zshrc
Here's what the special character means:
%n= user.%m= host.\D{%Y-%m-%d %H:%M:%S}= datetime “yyyy-mm-dd hh:mm:ss” format.\d= path.%#= show $ if root, else show %.