JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.01k stars 2.37k forks source link

Are git colors still supported in v3? #433

Closed johnknoop closed 3 years ago

johnknoop commented 3 years ago

Prerequisites

Description

On my old computer I'm running oh-my-posh v2, and I always got different colors if my local git branch is behind or has changes etc. That doesn't seem to be working in v3. I've tried adding colors as described here, but nothing changes.

Is it supposed to be working in v3, or is it not implemented yet?

Environment

Oh my Posh version: 3.94.2 Theme: Paradox Operating System: Windows 10 Shell: Powershell 7.1.2 Terminal: Windows Terminal

JanDeDobbeleer commented 3 years ago

Yes they are, actually have that set up myself. What does your config look like for the git segment?

EDIT: this is my config

{
    "type": "git",
    "style": "powerline",
    "powerline_symbol": "",
    "foreground": "#193549",
    "background": "#fffb38",
    "properties": {
        "display_stash_count": true,
        "display_upstream_icon": true,
        "status_colors_enabled": true,
        "local_changes_color": "#ff9248",
        "ahead_and_behind_color": "#f26d50",
        "behind_color": "#f17c37",
        "ahead_color": "#89d1dc",
        "stash_count_icon": "\uF692 "
    }
}

You need to set "status_colors_enabled": true otherwise the logic isn't ran (to avoid spending time).

johnknoop commented 3 years ago

Oh, it was the status_colors_enabled that was missing. Thanks for that!

github-actions[bot] commented 5 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.