summaryrefslogtreecommitdiffstats
path: root/debian/local/bash/profile.d/zz-git.sh
blob: 4b7dac6f3eb0be2b7fa862553aeaf5e9ad3652ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# /etc/profile.d/zz-git.sh

if [ "$(id -u)" -ne 0 ] && [ ! -e /etc/profile.d/zz-powerline.sh ] && [ -e /usr/lib/git-core/git-sh-prompt ]
then
	export GIT_PS1_DESCRIBE_STYLE="branch"
	export GIT_PS1_SHOWCOLORHINTS="true"
	export GIT_PS1_SHOWDIRTYSTATE="true"
	export GIT_PS1_SHOWSTASHSTATE="true"
	export GIT_PS1_SHOWUNTRACKEDFILES="true"
	export GIT_PS1_SHOWUPSTREAM="verbose"

	if [ -n "$SSH_CONNECTION" ]
	then
		export PROMPT_COMMAND="__git_ps1 '' '\[\033[1;32m\]\u\[\033[0m\]@\H:\w\\$ '"
	else
		export PROMPT_COMMAND="__git_ps1 '' '\[\033[1;32m\]\u\[\033[0m\]:\w\\$ '"
	fi
fi