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