---
title: "Comment by Matthew Lowe on \"A Guide to Customizing the Zsh Shell Prompt\" | Hashnode"
description: "Very useful, thanks. I just bought a new mac and it defaults to zsh, so figured I might as well as make the leap from Bash to Zsh. Only comment I&#39;d make is"
url: "https://hashnode.com/posts/a-guide-to-customizing-the-zsh-shell-prompt/604a8704ad1cac7d577dfa5e/comment/61adedbe9dc5a836391ba942"
---

[Discussion](https://hashnode.com/posts/a-guide-to-customizing-the-zsh-shell-prompt/604a8704ad1cac7d577dfa5e)

Comment [A Guide to Customizing the Zsh Shell Prompt](https://hashnode.com/posts/a-guide-to-customizing-the-zsh-shell-prompt/604a8704ad1cac7d577dfa5e)

[Matthew Lowe](https://hashnode.com/@lowey)

[Dec 6, 2021](https://hashnode.com/posts/a-guide-to-customizing-the-zsh-shell-prompt/604a8704ad1cac7d577dfa5e/comment/61adedbe9dc5a836391ba942)

Very useful, thanks. I just bought a new mac and it defaults to zsh, so figured I might as well as make the leap from Bash to Zsh.

Only comment I'd make is you need to include:

`setopt prompt_subst`

else the `$vcs_info_msg_0_` won't get expanded in the prompt. With your help and a little more searching I ended up with:

```
autoload -Uz vcs_info
setopt prompt_subst
precmd () { vcs_info }
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' unstagedstr '%F{red}*%f'
zstyle ':vcs_info:*' stagedstr '%F{green}*%f'
zstyle ':vcs_info:*' formats ' (%F{blue}%b%u%c%f)'
PS1='[ %B%n%b@%B%m%b:%F{green}%/%f$vcs_info_msg_0_ ] $ '
```
