Add option to show extended git status information.

Add an option 'BULLETTRAIN_GIT_STATUS' to allow user to show extended git repo status; e.g. added, modified, deleted files instead of just clean/dirty.
This commit is contained in:
Jocelyn Mallon
2014-07-15 16:16:12 -07:00
parent 5296d6c29e
commit 4c13e6b718

View File

@@ -138,8 +138,12 @@ prompt_git() {
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
prompt_segment $BULLETTRAIN_GIT_BG $BULLETTRAIN_GIT_FG prompt_segment $BULLETTRAIN_GIT_BG $BULLETTRAIN_GIT_FG
if [[ $BULLETTRAIN_GIT_STATUS == true ]] then
echo -n $(git_prompt_info)$(git_prompt_status)
else
echo -n $(git_prompt_info) echo -n $(git_prompt_info)
fi fi
fi
} }
prompt_hg() { prompt_hg() {