Senior Software Engineer
Senior Software Engineer sharing resources, tips, and lessons learned | Building octo.app in public | Black Lives Matter
Markdown supported · ⌘↵ to post
If you found this article useful or you found it lacking, please let me know! I'd love to improve my writing and improve this resource for you all. I'm just a quick comment away. 😁
Matthew Lowe
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_substelse 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_ ] $ '