Commit Graph
7 Commits
Author SHA1 Message Date
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
10ffeda6b5 fix(fossil)!: reduce prompt spacing (#11141)
BREAKING CHANGE: the fossil plugin now ships a prompt function that
removes spacing between segments. Spaces can always be added by
changing the setting variables. Check out the README for details.

* Reduced unnecessary space in Fossil plugin prompt

The prior version was way too opinionated, adding space between each element of the prompt string, unlike common Git prompt strings.  If the user wants more space, they can override our public variables to suit.  The inverse argument doesn't hold: it's easy to add space to existing variables, but not as easy to remove it after the fact.

As part of this, changed the branch name from red to blue (matching the preceding part of the prompt) so the red "X" added to indicate a dirty branch doesn't get lost in the branch name.

* fix(fossil): keep the branch name red
* Document fossil prompt settings

---------

Co-authored-by: Robby Russell <robby@planetargon.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Marc Cornellà <marc@mcornella.com>
2026-12-02 19:27:35 +01:00
Warren Young 34cd8fbd4a refactor(fossil): use fossil branch current supported since v2.7 (#11138)
Using the automation-friendly "fossil branch current" feature added in
Fossil 2.7 instead of ad hoc parsing of human-readable "fossil branch"
output.  Not only does this fix a stray space in the output, it's more
robust against changes in command output in general.

Closes #11138
2022-10-14 20:15:50 +02:00
Marc Cornellà a280726d93 fix(fossil): refactor fossil_prompt_info and quote % in branch 2022-01-03 14:00:54 +01:00
CGenieandMarc Cornellà 7df7d5b4f1 feat(fossil): add completion for fossil add (#8564)
Co-authored-by: Marc Cornellà <hello@mcornella.com>
2021-12-28 19:04:45 +01:00
wahjava e5d206c8c8 fix(fossil): PROMPT and RPROMPT are no longer exported (#9655)
Fixes #9654
2021-03-15 23:27:57 +01:00
jgmdev 2bce3b1f58 Added fossil plugin. 2016-05-10 13:23:23 -03:00