aks: only define the colors once

master
Alan Stebbens 11 years ago
parent 926c441b26
commit 3ab4973b86
  1. 24
      git-prompt-colors.sh

@ -1,19 +1,9 @@
# These are the color definitions used by gitprompt.sh # These are the color definitions used by gitprompt.sh
declare -g GIT_PROMPT_PREFIX define_git_prompt_colors() {
declare -g GIT_PROMPT_SUFFIX
declare -g GIT_PROMPT_SEPARATOR Time12a="\$(date +%H:%M)"
declare -g GIT_PROMPT_BRANCH PathShort="\w"
declare -g GIT_PROMPT_STAGED
declare -g GIT_PROMPT_CONFLICTS
declare -g GIT_PROMPT_CHANGED
declare -g GIT_PROMPT_REMOTE
declare -g GIT_PROMPT_UNTRACKED
declare -g GIT_PROMPT_STASHED
declare -g GIT_PROMPT_CLEAN
local Time12a="\$(date +%H:%M)"
local PathShort="\w"
# These are the color definitions used by gitprompt.sh # These are the color definitions used by gitprompt.sh
GIT_PROMPT_PREFIX="[" # start of the git info string GIT_PROMPT_PREFIX="[" # start of the git info string
@ -42,3 +32,9 @@ GIT_PROMPT_END_ROOT=" \n${White}${Time12a}${ResetColor} # "
GIT_PROMPT_SYMBOLS_AHEAD="↑·" # The symbol for "n versions ahead of origin" GIT_PROMPT_SYMBOLS_AHEAD="↑·" # The symbol for "n versions ahead of origin"
GIT_PROMPT_SYMBOLS_BEHIND="↓·" # The symbol for "n versions behind of origin" GIT_PROMPT_SYMBOLS_BEHIND="↓·" # The symbol for "n versions behind of origin"
GIT_PROMPT_SYMBOLS_PREHASH=":" # Written before hash of commit, if no name could be found GIT_PROMPT_SYMBOLS_PREHASH=":" # Written before hash of commit, if no name could be found
}
if [[ -z "$GIT_PROMPT_SEPARATOR" || -z "$GIT_PROMPT_COMMAND_OK" ]]; then
define_git_prompt_colors
fi

Loading…
Cancel
Save