This commit is contained in:
Warren Young 2025-03-19 19:21:35 +00:00 committed by GitHub
commit 1a282e75e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,16 +1,16 @@
_FOSSIL_PROMPT=""
# Prefix at the very beginning of the prompt, before the branch name
ZSH_THEME_FOSSIL_PROMPT_PREFIX="%{$fg_bold[blue]%}fossil:(%{$fg_bold[red]%}"
ZSH_THEME_FOSSIL_PROMPT_PREFIX="%{$fg_bold[blue]%}fossil:("
# At the very end of the prompt
ZSH_THEME_FOSSIL_PROMPT_SUFFIX="%{$fg_bold[blue]%})"
# Text to display if the branch is dirty
ZSH_THEME_FOSSIL_PROMPT_DIRTY=" %{$fg_bold[red]%}✖"
ZSH_THEME_FOSSIL_PROMPT_DIRTY="%{$fg_bold[red]%}✖"
# Text to display if the branch is clean
ZSH_THEME_FOSSIL_PROMPT_CLEAN=" %{$fg_bold[green]%}✔"
ZSH_THEME_FOSSIL_PROMPT_CLEAN="%{$fg_bold[green]%}✔"
function fossil_prompt_info() {
local branch=$(fossil branch current 2>&1)
@ -25,11 +25,11 @@ function fossil_prompt_info() {
dirty="$ZSH_THEME_FOSSIL_PROMPT_DIRTY"
fi
printf '%s %s %s %s %s' \
printf ' %s%s%s%s%s' \
"$ZSH_THEME_FOSSIL_PROMPT_PREFIX" \
"${branch:gs/%/%%}" \
"$ZSH_THEME_FOSSIL_PROMPT_SUFFIX" \
"$dirty" \
"$ZSH_THEME_FOSSIL_PROMPT_SUFFIX" \
"%{$reset_color%}"
}