Linux: zsh Prompt Setup

By Xah Lee. Date: .

Add date time and color to zsh prompt.

xah zsh prompt 2020-12-29 cPsnr
xah zsh prompt 2020-12-29
# 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:

Shell Prompt Setup