diff --git a/README.md b/README.md index 76fdf73..5793697 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,8 @@ NOTE: You do not need to specify *end* segment - it will be added automatically. |`BULLETTRAIN_GIT_BEHIND`|`" ⬇"`|Icon for behind state from remote |`BULLETTRAIN_GIT_DIVERGED`|`" ⬍"`|Icon for diverged state from remote +The git prompt can be disabled for a specific repository by setting a git config flag: `get config oh-my-zsh.hide-status 1`. This is useful to avoid performance issues for particularly huge repositories. + ### Mercurial/HG |Variable|Default|Meaning diff --git a/bullet-train.zsh-theme b/bullet-train.zsh-theme index 3fb6dfa..8442a4e 100644 --- a/bullet-train.zsh-theme +++ b/bullet-train.zsh-theme @@ -357,6 +357,10 @@ prompt_custom() { # Git prompt_git() { + if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" == "1" ]]; then + return + fi + local ref dirty mode repo_path git_prompt repo_path=$(git rev-parse --git-dir 2>/dev/null)