From eccb4b79e3c43f7657e8291ce0d5178eeb096cf7 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Fri, 26 Sep 2014 20:55:22 -0400 Subject: [PATCH] Fixed af-magic with colors --- af-magic.zsh-theme | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) mode change 100644 => 100755 af-magic.zsh-theme diff --git a/af-magic.zsh-theme b/af-magic.zsh-theme old mode 100644 new mode 100755 index 4b126b4..c3f9d99 --- a/af-magic.zsh-theme +++ b/af-magic.zsh-theme @@ -1,6 +1,45 @@ -# af-magic.zsh-theme -# Repo: https://github.com/andyfleming/oh-my-zsh -# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme +# Symbols +: ${is_a_git_repo_symbol:='❤'} +: ${has_untracked_files_symbol:='∿'} +: ${has_adds_symbol:='+'} +: ${has_deletions_symbol:='-'} +: ${has_deletions_cached_symbol:='✖'} +: ${has_modifications_symbol:='✎'} +: ${has_modifications_cached_symbol:='☲'} +: ${ready_to_commit_symbol:='→'} +: ${is_on_a_tag_symbol:='⌫'} +: ${needs_to_merge_symbol:='ᄉ'} +: ${has_upstream_symbol:='⇅'} +: ${detached_symbol:='⚯ '} +: ${can_fast_forward_symbol:='»'} +: ${has_diverged_symbol:='Ⴤ'} +: ${rebase_tracking_branch_symbol:='↶'} +: ${merge_tracking_branch_symbol:='ᄉ'} +: ${should_push_symbol:='↑'} +: ${has_stashes_symbol:='★'} + +# Flags +: ${display_has_upstream:=false} +: ${display_tag:=false} +: ${display_tag_name:=true} +: ${two_lines:=false} +: ${finally:=''} +: ${use_color_off:=false} +autoload colors && colors +for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do + eval $COLOR='%{$fg_no_bold[${(L)COLOR}]%}' #wrap colours between %{ %} to avoid weird gaps in autocomplete + eval BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}' +done +eval RESET='%{$reset_color%}' +on=$WHITE +off=$WHITE +red=$RED +green=$GREEN +yellow=$YELLOW +violet=$CYAN +branch_color=$BLUE +reset=$RESET + if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi if [ -z "$SSH_TTY" ] && [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ] ; then