current branch & path in .zshrc
in ~/.zshrc
# ... # START current branch & path in ZSH https://stackoverflow.com/questions/17333531/how-can-i-display-the-current-branch-and-folder-path-in-terminal parse_git_branch() { git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p' } COLOR_DEF='%f' COLOR_USR='%F{243}' COLOR_DIR='%F{197}' COLOR_GIT='%F{39}' #NEWLINE=$'\n' NEWLINE=$'' setopt PROMPT_SUBST export PROMPT='${COLOR_USR}%n@%m ${COLOR_DIR}%d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}%% ' # END current branch & path in ZSH #...