Fixed Issue #6: Definig $PROMPT_START $PROMPT_END out of gitprompt.sh

It is now possible to override PROMPT_START and PROMPT_END by exporting the variables GIT_PROMPT_START and GIT_PROMPT_END
master
Martin Gondermann 13 years ago
parent 31773c1bd6
commit 43a4f3c9ee
  1. 13
      gitprompt.sh

@ -51,8 +51,17 @@ function git_prompt_config()
# local Time12a="(\@))"
local PathShort="\w"
PROMPT_START="${Yellow}${PathShort}${ResetColor}"
PROMPT_END=" \n${White}${Time12a}${ResetColor} $ "
if [ "x${GIT_PROMPT_START}" == "x" ]; then
PROMPT_START="${Yellow}${PathShort}${ResetColor}"
else
PROMPT_START="${GIT_PROMPT_START}"
fi
if [ "x${GIT_PROMPT_END}" == "x" ]; then
PROMPT_END=" \n${White}${Time12a}${ResetColor} $ "
else
PROMPT_END="${GIT_PROMPT_END}"
fi
EMPTY_PROMPT="${PROMPT_START}${PROMPT_END}"

Loading…
Cancel
Save