Not for normies
| 1 | setopt prompt_subst |
| 2 | |
| 3 | autoload -U add-zsh-hook |
| 4 | autoload -Uz vcs_info |
| 5 | |
| 6 | # check-for-changes can be really slow. |
| 7 | # you should disable it, if you work with large repositories |
| 8 | zstyle ':vcs_info:*:prompt:*' check-for-changes true |
| 9 | |
| 10 | add-zsh-hook precmd mikeh_precmd |
| 11 | |
| 12 | mikeh_precmd() { |
| 13 | vcs_info |
| 14 | } |
| 15 | |
| 16 | # user, host, full path, and time/date |
| 17 | # on two lines for easier vgrepping |
| 18 | # entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 |
| 19 | PROMPT=$'%{\e[0;34m%}%B..[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} |
| 20 | %{\e[0;34m%}%B..%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <($vcs_info_msg_0_)>%{\e[0m%}%b ' |
| 21 | PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' |