Changed if statement. Added docs.

master
oGre 9 years ago
parent 12ef3c0363
commit 21ea21f406
  1. 2
      README.md
  2. 2
      gitprompt.sh

@ -126,6 +126,8 @@ Add to the `~/.bashrc`:
# GIT_PROMPT_SHOW_UPSTREAM=1 # uncomment to show upstream tracking branch # GIT_PROMPT_SHOW_UPSTREAM=1 # uncomment to show upstream tracking branch
# GIT_PROMPT_SHOW_UNTRACKED_FILES=all # can be no, normal or all; determines counting of untracked files # GIT_PROMPT_SHOW_UNTRACKED_FILES=all # can be no, normal or all; determines counting of untracked files
# GIT_PROMPT_SHOW_CHANGED_FILES_COUNT=0 # uncomment to avoid printing the number of changed files
# GIT_PROMPT_STATUS_COMMAND=gitstatus_pre-1.7.10.sh # uncomment to support Git older than 1.7.10 # GIT_PROMPT_STATUS_COMMAND=gitstatus_pre-1.7.10.sh # uncomment to support Git older than 1.7.10

@ -519,7 +519,7 @@ function updatePrompt() {
v="\$GIT_$1 $2" v="\$GIT_$1 $2"
fi fi
if eval "test $v" ; then if eval "test $v" ; then
if [[ $# -lt 2 || "$3" != '-' ]] && [[ "x$1" == "xREMOTE" || "${__GIT_PROMPT_SHOW_CHANGED_FILES_COUNT}" -eq "1" ]]; then if [[ $# -lt 2 || "$3" != '-' ]] && [[ "x$1" == "xREMOTE" || "x$__GIT_PROMPT_SHOW_CHANGED_FILES_COUNT" == "x1" ]]; then
__add_status "\$GIT_PROMPT_$1\$GIT_$1\$ResetColor" __add_status "\$GIT_PROMPT_$1\$GIT_$1\$ResetColor"
else else
__add_status "\$GIT_PROMPT_$1\$ResetColor" __add_status "\$GIT_PROMPT_$1\$ResetColor"

Loading…
Cancel
Save