dotwryn/zsh/colors

25 lines
524 B
Plaintext
Raw Normal View History

2019-12-31 00:48:53 +00:00
#!/bin/zsh
2019-12-31 02:00:58 +00:00
# get the branch :)
2019-12-31 00:48:53 +00:00
parse_git_branch(){
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
# zsh prompt
2019-12-31 02:00:58 +00:00
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";