Merge pull request #1 from arialdomartini/fix-21

Using zsh colors. This fixes the issue #21 found by @jvtrigueros
This commit is contained in:
Arialdo Martini 2013-11-22 11:26:34 -08:00
commit 260dcc69b2
2 changed files with 31 additions and 18 deletions

View File

@ -27,15 +27,22 @@
: ${use_color_off:=false} : ${use_color_off:=false}
# Colors #load colors
: ${on='\033[0;37m'} autoload colors && colors
: ${off='\033[1;30m'} for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do
: ${red='\033[0;31m'} eval $COLOR='%{$fg_no_bold[${(L)COLOR}]%}' #wrap colours between %{ %} to avoid weird gaps in autocomplete
: ${green='\033[0;32m'} eval BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}'
: ${yellow='\033[0;33m'} done
: ${violet='\033[0;35m'} eval RESET='%{$reset_color%}'
: ${branch_color='\033[0;34m'}
: ${reset=''} on=$WHITE
off=$WHITE
red=$RED
green=$GREEN
yellow=$YELLOW
violet=$CYAN
branch_color=$BLUE
reset=$RESET
PROMPT='$(build_prompt)%{$fg_bold[green]%}%~ PROMPT='$(build_prompt)%{$fg_bold[green]%}%~

View File

@ -27,16 +27,22 @@
: ${use_color_off:=false} : ${use_color_off:=false}
# Colors #load colors
: ${on='\033[0;37m'} autoload colors && colors
: ${off='\033[1;30m'} for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do
: ${red='\033[0;31m'} eval $COLOR='%{$fg_no_bold[${(L)COLOR}]%}' #wrap colours between %{ %} to avoid weird gaps in autocomplete
: ${green='\033[0;32m'} eval BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}'
: ${yellow='\033[0;33m'} done
: ${violet='\033[0;35m'} eval RESET='%{$reset_color%}'
: ${branch_color='\033[0;34m'}
: ${reset=''}
on=$WHITE
off=$WHITE
red=$RED
green=$GREEN
yellow=$YELLOW
violet=$CYAN
branch_color=$BLUE
reset=$RESET
PROMPT='$(build_prompt)%{$fg_bold[green]%} PROMPT='$(build_prompt)%{$fg_bold[green]%}
%~%{$fg_bold[white]%} ∙ ' %~%{$fg_bold[white]%} ∙ '