ZCH seem to be the default shell for MacOs BigSur Terminals Which means that the old bash commands to beautify the terminal prompts are outdated. Here is a fresh new prompt for ZSH Terminal
Steps
touch ~/.zshrc
- copy and paste from line 10 of this file
- save the .zshrc file
- run
source ~/.zshrc
#!/bin/zsh
# Load version control information
autoload -Uz vcs_info
precmd() { vcs_info }
# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats '%F{8}⤞ %f%F{166}%b%f'
# Set up the prompt (with git branch name)
setopt PROMPT_SUBST
PROMPT='%F{166}%n%f%F{8} in%f %F{33}%1~%f ${vcs_info_msg_0_}
%F{10}$%f '