feat(statusline): add git_show_behind config option#156
Merged
Conversation
Adds a `git_show_behind` boolean (default: true) to suppress the ⇣N behind indicator. Ahead/behind are both computed from local tracking refs — no remote query — but behind reflects "what's on remote that you haven't pulled" rather than "what did this session do," which is a less useful signal in the Claude Code context. - Add DEFAULT_GIT_SHOW_BEHIND and GIT_SHOW_BEHIND variable - Wire through load_config from config.json - Guard ⇣N display in seg_git with GIT_SHOW_BEHIND check - Bump version 1.1.4 → 1.1.5 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new configuration switch to control whether the git segment shows the “behind” (⇣N) indicator, allowing users to hide remote-behind status while keeping other git status indicators.
Changes:
- Introduces
git_show_behindconfig parsing and gates rendering of the ⇣N indicator on it. - Adds new defaults for the option and bumps the plugin version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| plugins-claude/statusline/scripts/statusline.sh | Adds git_show_behind default/config parsing and conditionally renders the behind indicator. |
| plugins-claude/statusline/.claude-plugin/plugin.json | Bumps plugin version to 1.1.5. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| EXTRA_HIDE_ZERO=true | ||
| EXTRA_ONLY_BURNING=false | ||
| CURRENCY="" | ||
| GIT_SHOW_BEHIND=true |
| v=$(echo "$cfg" | jq -r '.extra_hide_zero // empty' 2>/dev/null) && [[ -n "$v" ]] && EXTRA_HIDE_ZERO="$v" | ||
| v=$(echo "$cfg" | jq -r '.extra_only_burning // empty' 2>/dev/null) && [[ -n "$v" ]] && EXTRA_ONLY_BURNING="$v" | ||
| v=$(echo "$cfg" | jq -r '.currency // empty' 2>/dev/null) && [[ -n "$v" ]] && CURRENCY="$v" | ||
| v=$(echo "$cfg" | jq -r '.git_show_behind // empty' 2>/dev/null) && [[ -n "$v" ]] && GIT_SHOW_BEHIND="$v" |
| { | ||
| "name": "statusline", | ||
| "version": "1.1.4", | ||
| "version": "1.1.5", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git_show_behindboolean config option (default:true) to suppress the ⇣N behind indicator in the git segmentgit_show_behind: falsein the user config by default for the maintainerTest plan
⇡Nstill appears when commits are ahead of tracking ref⇣Nis hidden whengit_show_behind: falsein config⇣Nstill appears whengit_show_behind: true(default)🤖 Generated with Claude Code