... | ... |
@@ -1,9 +1,14 @@ |
1 | 1 |
# get the name of the branch we are on |
2 | 2 |
function git_prompt_info() { |
3 |
+ [[ "$GIT_PROMPT_DISABLED" != "" ]] && return |
|
3 | 4 |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return |
4 | 5 |
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(git_prompt_status)$ZSH_THEME_GIT_PROMPT_SUFFIX" |
5 | 6 |
} |
6 | 7 |
|
8 |
+function disable_git_prompt_info() { |
|
9 |
+ GIT_PROMPT_DISABLED=1 |
|
10 |
+} |
|
11 |
+ |
|
7 | 12 |
# Checks if working tree is dirty |
8 | 13 |
parse_git_dirty() { |
9 | 14 |
if [[ -n $(git status -s 2> /dev/null) ]]; then |