aboutsummaryrefslogtreecommitdiff
path: root/pdksh
diff options
context:
space:
mode:
Diffstat (limited to 'pdksh')
-rw-r--r--pdksh/pdkshrc.d/prompt.pdksh4
1 files changed, 2 insertions, 2 deletions
diff --git a/pdksh/pdkshrc.d/prompt.pdksh b/pdksh/pdkshrc.d/prompt.pdksh
index 4f4986b6..f97c9096 100644
--- a/pdksh/pdkshrc.d/prompt.pdksh
+++ b/pdksh/pdkshrc.d/prompt.pdksh
@@ -111,8 +111,8 @@ prompt() {
state=${state}^
fi
- # Print the status in brackets with a git: prefix
- printf '(git:%s%s)' "${branch:-unknown}" "$state"
+ # Print the status in brackets; add a git: prefix only if there might be another VCS prompt (because PROMPT_VCS is set)
+ printf '(%s%s%s)' "${PROMPT_VCS:+git:}" "${branch:-unknown}" "$state"
;;
# Revert to simple inexpensive prompts