Skip to content

add POWERLEVEL9K_VCS_AHEAD_BACKGROUND parameter #14075

Description

@turgay23

If the feature request is for a plugin or theme, specify it here.

No response

If the feature solves a problem you have, specify it here.

No response

Describe the proposed feature.

Description:

Currently, the VCS segment's background color can only be set based on these states: CLEAN, MODIFIED, UNTRACKED, CONFLICTED, LOADING. However, the "local branch is ahead of the remote" condition (VCS_STATUS_COMMITS_AHEAD > 0) isn't represented as its own state — even when the working tree is completely clean (no staged/unstaged changes, no conflicts), the segment still falls back to the CLEAN background if there are unpushed commits.

Use case: I want the prompt to clearly flag (via background color) situations where I've committed but forgotten to push. Right now the only way to achieve this is by overriding the internal prompt_vcs function, which isn't a documented/public API and could break in future releases.

Requested change:

Add POWERLEVEL9K_VCS_AHEAD_BACKGROUND (and, for consistency, POWERLEVEL9K_VCS_BEHIND_BACKGROUND) as new configuration parameters. Suggested priority order:

CONFLICTED > MODIFIED > UNTRACKED > AHEAD/BEHIND > CLEAN

That is, if the working tree is clean but there are unpushed/unpulled commits, this new parameter would take precedence over CLEAN.

Backward compatibility: If these parameters are left unset, existing behavior (falling back to the CLEAN background) should remain unchanged — this should be an opt-in addition.

Describe alternatives you've considered

No response

Additional context

No response

Related Issues

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions