1
0
Fork 0

Adding git prompt.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
Daniel Baumann 2025-06-23 09:54:02 +02:00
parent c46355a64c
commit 923eb58c6b
Signed by: daniel.baumann
GPG key ID: BCC918A2ABD66424

18
debian/local/bash/profile.d/zz-git.sh vendored Normal file
View file

@ -0,0 +1,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