summaryrefslogtreecommitdiff
path: root/bash-git-prompt.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-06-27 18:19:40 +0200
committerErich Eckner <git@eckner.net>2016-06-27 18:42:45 +0200
commit4cba06896d9a9be0431cfcd7275667e5a25956d7 (patch)
tree749025218b896a00108617644d46c4e25186ad62 /bash-git-prompt.in
parenta626f841c71f3bc9c2a645d04ccc0f33685391cc (diff)
downloadbash-git-prompt-4cba06896d9a9be0431cfcd7275667e5a25956d7.tar.xz
Konfig und skipDirRegEx neu
Diffstat (limited to 'bash-git-prompt.in')
-rwxr-xr-xbash-git-prompt.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/bash-git-prompt.in b/bash-git-prompt.in
index 2f40afe..b678bfb 100755
--- a/bash-git-prompt.in
+++ b/bash-git-prompt.in
@@ -16,7 +16,15 @@
PS1="$PS1Start"
-if status=$(git status --porcelain 2> /dev/null)
+. #ETCDIR#/bash-git-prompt.conf
+
+skip=false
+if [ -n "${skipDirRegEx}" ] && pwd | grep -q "${skipDirRegEx}" &> /dev/null
+then
+ skip=true
+fi
+
+if ! ${skip} && status=$(git status --porcelain 2> /dev/null)
then
PS1="$PS1 "
branch="$((git symbolic-ref HEAD 2> /dev/null || git describe --always) | sed "s|^.*/||")"