diff options
author | Erich Eckner <git@eckner.net> | 2016-06-27 18:19:40 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-06-27 18:42:45 +0200 |
commit | 4cba06896d9a9be0431cfcd7275667e5a25956d7 (patch) | |
tree | 749025218b896a00108617644d46c4e25186ad62 /bash-git-prompt.in | |
parent | a626f841c71f3bc9c2a645d04ccc0f33685391cc (diff) | |
download | bash-git-prompt-4cba06896d9a9be0431cfcd7275667e5a25956d7.tar.xz |
Konfig und skipDirRegEx neu
Diffstat (limited to 'bash-git-prompt.in')
-rwxr-xr-x | bash-git-prompt.in | 10 |
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|^.*/||")" |