Files
oh-my-zsh/plugins/fossil
8ba0ed4ede fix(fossil): improve placement of the fossil prompt info (#11139)
* Better placement of Fossil prompt info

Instead of blindly tacking `$fossil_prompt_info` onto the end of the
prompt string and making assumptions about whether `$PROMPT` or
`$RPROMPT` are in use here, assume the user is using a theme that puts
`$git_prompt_info` in there somewhere and inject our info immediately
afterward.  The theme creator decided that's a good place for Git prompt
info, so that's a good place for Fossil prompt info, too.

This also replaces some calls out to `grep` with internal Zsh string
manipulation for less overhead.

* fix(fossil): fall back to RPROMPT when the theme has no git_prompt_info

Keeps today's behaviour for themes without git_prompt_info, and re-checks on
each prompt in case the theme rebuilds its prompt.

---------

Co-authored-by: Robby Russell <robby@planetargon.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 19:30:07 +01:00
..

Fossil Plugin

This plugin adds completion support and prompt for fossil repositories.

To use it, add fossil to the plugins array in your .zshrc file:

plugins=(... fossil)
``

This plugin provides a prompt function named `fossil_prompt_info` that
will display the current branch and if there are changes (dirty) or not (clean).

### Prompt segments

These variables control how the prompt function looks:

ZSH_THEME_FOSSIL_PROMPT_PREFIX="%{$fg_bold[blue]%}fossil:(%{$fg_bold[red]%}" ZSH_THEME_FOSSIL_PROMPT_SUFFIX="%{$fg_bold[blue]%})" ZSH_THEME_FOSSIL_PROMPT_DIRTY="%{$fg_bold[red]%}✖" ZSH_THEME_FOSSIL_PROMPT_CLEAN="%{$fg_bold[green]%}✔"


You can override their values in your .zshrc file, anywhere after the
`source $ZSH/oh-my-zsh.sh` line.

### CONTRIBUTOR

- Jefferson González ([jgmdev](https://github.com/jgmdev))