summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 10:14:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 10:14:34 +0000
commit76061571f947cc55e8684f351dc51602a6a69929 (patch)
tree51ea758b8e3b3462f5ca09cefd8702c243cf2770 /debian
parentAdding coreutils aliases. (diff)
downloadbase-files-76061571f947cc55e8684f351dc51602a6a69929.tar.xz
base-files-76061571f947cc55e8684f351dc51602a6a69929.zip
Adding git prompt.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian')
-rw-r--r--debian/local/bash/profile.d/zz-git.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/local/bash/profile.d/zz-git.sh b/debian/local/bash/profile.d/zz-git.sh
new file mode 100644
index 0000000..4b7dac6
--- /dev/null
+++ b/debian/local/bash/profile.d/zz-git.sh
@@ -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