diff options
author | 2016-12-05 16:57:01 +0100 | |
---|---|---|
committer | 2016-12-05 16:57:01 +0100 | |
commit | dc1b78d04cecc3ab81e1ba3dd9e2bd0e8440cb85 (patch) | |
tree | 7f974abc82b47555ca47426efcda84109213fe1f /INSTALL | |
parent | a760652afe40c9769433c090d39f569403eed646 (diff) |
bashrc: fix git prompt with newer git versions
Change-Id: I662c6d0ffdf3b9e9e4c82b42ec2c77e9cbc54eab
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'INSTALL')
-rw-r--r-- | INSTALL/config/bashrc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/INSTALL/config/bashrc b/INSTALL/config/bashrc index 27da492..a8222a0 100644 --- a/INSTALL/config/bashrc +++ b/INSTALL/config/bashrc @@ -68,7 +68,8 @@ if [ "$PS1" ]; then git_status="$(git status 2> /dev/null)" # Set color based on clean/staged/dirty. - if [[ ${git_status} =~ "working directory clean" ]]; then + status_pattern="working (tree|directory) clean" + if [[ ${git_status} =~ ${status_pattern} ]]; then state="${GREEN}" elif [[ ${git_status} =~ "Changes to be committed" ]]; then state="${YELLOW}" |