diff --git a/bullet-train.zsh-theme b/bullet-train.zsh-theme index 48a3f22..376e29d 100644 --- a/bullet-train.zsh-theme +++ b/bullet-train.zsh-theme @@ -160,6 +160,9 @@ fi if [ ! -n "${BULLETTRAIN_GIT_EXTENDED+1}" ]; then BULLETTRAIN_GIT_EXTENDED=true fi +if [ ! -n "${BULLETTRAIN_GIT_PROMPT_CMD+1}" ]; then + BULLETTRAIN_GIT_PROMPT_CMD="\$(git_prompt_info)" +fi # HG if [ ! -n "${BULLETTRAIN_HG_SHOW+1}" ]; then @@ -343,7 +346,7 @@ prompt_git() { return fi - local ref dirty mode repo_path + local ref dirty mode repo_path git_prompt repo_path=$(git rev-parse --git-dir 2>/dev/null) if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then @@ -352,10 +355,11 @@ prompt_git() { fi prompt_segment $BULLETTRAIN_GIT_BG $BULLETTRAIN_GIT_FG + eval git_prompt=${BULLETTRAIN_GIT_PROMPT_CMD} if [[ $BULLETTRAIN_GIT_EXTENDED == true ]]; then - echo -n $(git_prompt_info)$(git_prompt_status) + echo -n ${git_prompt}$(git_prompt_status) else - echo -n $(git_prompt_info) + echo -n ${git_prompt} fi fi }