#14075·ohmyzsh

add POWERLEVEL9K_VCS_AHEAD_BACKGROUND parameter

Author: turgay23Created Sep 6, 2026Updated Sep 6, 2026
LabelsFeature

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