Skip to content

Commit 0074d3d

Browse files
committed
git-prompt.sh: update shell variable instructions.
Clarify the need to set variables like GIT_PS1_SHOWDIRTYSTATE before "source ~/.git-prompt.sh" is executed in your shell init process. If you set these preferences too late i.e. after .git-prompt.sh executes, they will silently fail to take effect. Signed-off-by: Edward D'Souza <edsouza@gmail.com>
1 parent cb5918a commit 0074d3d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/completion/git-prompt.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
#
3636
# The prompt status always includes the current branch name.
3737
#
38+
# The prompt can be customized by setting various shell variables
39+
# (GIT_PS1_SHOWDIRTYSTATE, GIT_PS1_SHOWSTASHSTATE, etc.), which are described
40+
# below. Make sure that these variables get set *before* the
41+
# "source ~/.git-prompt.sh" line from step 2 (above) runs.
42+
#
3843
# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
3944
# unstaged (*) and staged (+) changes will be shown next to the branch
4045
# name. You can configure this per-repository with the

0 commit comments

Comments
 (0)