dotwryn/zsh/colors
2019-12-31 14:49:57 -07:00

27 lines
553 B
Bash

#!/bin/zsh
# ls colors
alias ls='ls --color=auto';
# zsh prompt
COFFEE="☕";
PREVIOUS_COMMAND_CONDITION="%B%(?.%F{yellow}.%F{210}) $COFFEE";
USER='%B%F{green}%n';
SEPARATOR='%b%F{red}::';
DIRECTORY='%B%F{yellow}%6~';
function parse_git_branch(){
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
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";