Skip to content

Commit 36bfb5e

Browse files
authored
Add files via upload
1 parent 17da0a2 commit 36bfb5e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

git-prompt.sh

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
if test -f /etc/profile.d/git-sdk.sh
2+
then
3+
TITLEPREFIX=SDK-${MSYSTEM#MINGW}
4+
else
5+
TITLEPREFIX=$MSYSTEM
6+
fi
7+
8+
if test -f ~/.config/git/git-prompt.sh
9+
then
10+
. ~/.config/git/git-prompt.sh
11+
else
12+
PS1='\[\033]0;${PWD//[^[:ascii:]]/?}\007\]' # set window title
13+
PS1="$PS1"'\n' # new line
14+
PS1="$PS1"'\[\033[32m\]' # change to green
15+
PS1="$PS1"''
16+
PS1="$PS1"'\[\033[33m\]' # change to brownish yellow
17+
PS1="$PS1"'${PWD##*/}' # current working folder
18+
if test -z "$WINELOADERNOEXEC"
19+
then
20+
GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)"
21+
COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}"
22+
COMPLETION_PATH="${COMPLETION_PATH%/lib/git-core}"
23+
COMPLETION_PATH="$COMPLETION_PATH/share/git/completion"
24+
if test -f "$COMPLETION_PATH/git-prompt.sh"
25+
then
26+
"$COMPLETION_PATH/git-completion.bash"
27+
. "$COMPLETION_PATH/git-prompt.sh"
28+
PS1="$PS1"'\[\033[36m\]' # change color to cyan
29+
PS1="$PS1"'`__git_ps1`' # bash function
30+
fi
31+
fi
32+
PS1="$PS1"'\[\033[0m\]' # change color
33+
PS1="$PS1"' ' # space
34+
fi
35+
36+
MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc

0 commit comments

Comments
 (0)