Fix indent and Strip traling spaces

master
Denny Schäfer 12 years ago
parent 68d965913c
commit 1409feed8f
  1. 12
      gitprompt.sh

@ -12,7 +12,7 @@ function git_prompt_dir()
[[ $SOURCE != /* ]] && SOURCE="${DIR}/${SOURCE}" [[ $SOURCE != /* ]] && SOURCE="${DIR}/${SOURCE}"
done done
__GIT_PROMPT_DIR="$( cd -P "$( dirname "${SOURCE}" )" && pwd )" __GIT_PROMPT_DIR="$( cd -P "$( dirname "${SOURCE}" )" && pwd )"
fi fi
} }
function git_prompt_config() function git_prompt_config()
@ -98,7 +98,7 @@ function setGitPrompt() {
local __GIT_STATUS_CMD local __GIT_STATUS_CMD
git_prompt_config git_prompt_config
local repo=`git rev-parse --show-toplevel 2> /dev/null` local repo=`git rev-parse --show-toplevel 2> /dev/null`
if [[ ! -e "${repo}" ]]; then if [[ ! -e "${repo}" ]]; then
PS1="${EMPTY_PROMPT}" PS1="${EMPTY_PROMPT}"
@ -141,19 +141,19 @@ function setGitPrompt() {
if [ "${GIT_CONFLICTS}" -ne "0" ]; then if [ "${GIT_CONFLICTS}" -ne "0" ]; then
STATUS="${STATUS}${GIT_PROMPT_CONFLICTS}${GIT_CONFLICTS}${ResetColor}" STATUS="${STATUS}${GIT_PROMPT_CONFLICTS}${GIT_CONFLICTS}${ResetColor}"
fi fi
if [ "${GIT_CHANGED}" -ne "0" ]; then if [ "${GIT_CHANGED}" -ne "0" ]; then
STATUS="${STATUS}${GIT_PROMPT_CHANGED}${GIT_CHANGED}${ResetColor}" STATUS="${STATUS}${GIT_PROMPT_CHANGED}${GIT_CHANGED}${ResetColor}"
fi fi
if [ "${GIT_UNTRACKED}" -ne "0" ]; then if [ "${GIT_UNTRACKED}" -ne "0" ]; then
STATUS="${STATUS}${GIT_PROMPT_UNTRACKED}${GIT_UNTRACKED}${ResetColor}" STATUS="${STATUS}${GIT_PROMPT_UNTRACKED}${GIT_UNTRACKED}${ResetColor}"
fi fi
if [ "${GIT_CLEAN}" -eq "1" ]; then if [ "${GIT_CLEAN}" -eq "1" ]; then
STATUS="${STATUS}${GIT_PROMPT_CLEAN}" STATUS="${STATUS}${GIT_PROMPT_CLEAN}"
fi fi
STATUS="${STATUS}${ResetColor}${GIT_PROMPT_SUFFIX}" STATUS="${STATUS}${ResetColor}${GIT_PROMPT_SUFFIX}"

Loading…
Cancel
Save