#!/bin/zsh # get the branch :) parse_git_branch(){ git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/' } # zsh prompt COFFEE="☕"; PREVIOUS_COMMAND_CONDITION="%B%(?.%F{magenta}.%F{210}) $COFFEE"; USER='%B%F{green}%n'; SEPARATOR='%b%F{red}::'; DIRECTORY='%B%F{yellow}%6~'; GIT_BRANCH='%B%F{cyan}$(parse_git_branch)'; PROMPT=$'\n'' %B%F{128}%# %b%f' setopt PROMPT_SUBST PS1="$PREVIOUS_COMMAND_CONDITION $USER $SEPARATOR $DIRECTORY $GIT_BRANCH $PROMPT" #RPROMPT="$(\e[1A) $GIT_BRANCH";