My current prompt configuration:

PROMPT=$'%F{blue}[ %F{gray}%n%F{blue}@%F{gray}%m%F{blue} ]-[ %F{gray}%D{%Y-%m-%d} %*%F{blue} ]-[ %F{gray}%~%F{blue} ]\n%# '
  • %F{color} set text foreground color
  • %n logged in user
  • %m machine hostname
  • %D{%Y-%m-%d} date in yyyy-mm-dd format
  • %* time in hh:mm:ss 24h format
  • %~ full path to working directory, with $HOME abbreviated as ~
  • \n a literal newline character
    • the prompt must be encased like so $'' for this character to be interpreted
  • %# prompt character (% for normal user)

EOF