diff --git a/lib/omb-prompt-base.sh b/lib/omb-prompt-base.sh index 5c25620..fe7bcfb 100644 --- a/lib/omb-prompt-base.sh +++ b/lib/omb-prompt-base.sh @@ -108,6 +108,11 @@ function _omb_prompt_git { command git "$@" } +function _omb_prompt_git_status_enabled { + [[ $(_omb_prompt_git config --get-regexp '^(oh-my-zsh|bash-it|oh-my-bash)\.hide-status$' | + awk '$2== "1" {hide_status = 1;} END { print hide_status; }') != "1" ]] +} + function scm { if [[ "$SCM_CHECK" = false ]]; then SCM=$SCM_NONE elif [[ -f .git/HEAD ]]; then SCM=$SCM_GIT @@ -186,7 +191,7 @@ function git_prompt_minimal_info { local git_status_flags=('--porcelain') SCM_STATE=${SCM_THEME_PROMPT_CLEAN} - if [[ "$(_omb_prompt_git config --get bash-it.hide-status)" != "1" ]]; then + if _omb_prompt_git_status_enabled; then # Get the branch reference ref=$(git_clean_branch) || \ ref=$(_omb_prompt_git rev-parse --short HEAD 2> /dev/null) || return 0