1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,24 @@ |
1 |
+# NOTE: `git-sh-prompt` relies on non-POSIX features, but we use it anyway |
|
2 |
+# since the risk of a user running a Bourne style shell without these |
|
3 |
+# features as a login shell is low. |
|
4 |
+ |
|
5 |
+# https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh |
|
6 |
+if [ -r '/usr/lib/git-core/git-sh-prompt' ] |
|
7 |
+then |
|
8 |
+ GIT_PS1_SHOWDIRTYSTATE='y' |
|
9 |
+ GIT_PS1_SHOWSTASHSTATE='y' |
|
10 |
+ GIT_PS1_SHOWUNTRACKEDFILES='y' |
|
11 |
+ GIT_PS1_SHOWUPSTREAM='auto verbose' |
|
12 |
+ # GIT_PS1_SHOWCOLORHINTS='y' |
|
13 |
+ . '/usr/lib/git-core/git-sh-prompt' |
|
14 |
+else |
|
15 |
+ __git_ps1() |
|
16 |
+ { |
|
17 |
+ : |
|
18 |
+ } |
|
19 |
+fi |
|
20 |
+ |
|
21 |
+__prompt_git() |
|
22 |
+{ |
|
23 |
+ __git_ps1 "$@" |
|
24 |
+} |