Skip to content

Add flags_without_count option to show git status icons without counts #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 31, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 31, 2025

This PR adds a new configuration option flags_without_count that allows users to display git status symbols without their numerical counts, saving space while still providing visual status indicators.

Changes

  • New option: Added flags_without_count boolean option to the configuration (defaults to false for backward compatibility)
  • Enhanced formatting: Modified the flags() function to conditionally exclude counts when the option is enabled
  • Updated default config: Added the new option to .gitmux.yml with proper documentation
  • Comprehensive tests: Added TestFlagsWithoutCount() with multiple test cases covering various scenarios

Behavior

Before (default behavior):

⎇ main origin/main - ● 3 ✚ 2 … 1 ⚑ 1

After (with flags_without_count: true):

⎇ main origin/main - ● ✚ … ⚑

The feature works with all git status flags:

  • (staged files)
  • (modified files)
  • (untracked files)
  • (stashed changes)
  • (conflicts)
  • (clean - unaffected as it never shows counts)

Usage

Add to your .gitmux.yml configuration:

tmux:
  options:
    flags_without_count: true

This change is fully backward compatible - existing configurations will continue to work unchanged since the option defaults to false.

Fixes #124.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@arl
Copy link
Owner

arl commented Jul 31, 2025

@copilot look at the comment I made below the issue description in #129
My comment gives you the name of the new option and some example.

Here are added requirements for this issue:

  • there should be unit tests
  • default configuration (.gitmux.yml) should be modified with the new option.
  • README.md should be updated and document the new option.

@Copilot Copilot AI changed the title [WIP] [FEATURE] Ability to show icon only - no count Add flags_without_count option to show git status icons without counts Jul 31, 2025
@Copilot Copilot AI requested a review from arl July 31, 2025 08:23
Copilot finished work on behalf of arl July 31, 2025 08:23
Copy link
Contributor Author

Copilot AI commented Jul 31, 2025

@copilot look at the comment I made below the issue description in #129
My comment gives you the name of the new option and some example.

...

All requirements have been addressed in commit 2445860:

Unit tests: Added TestFlagsWithoutCount() with comprehensive test cases covering various scenarios
Default configuration: Updated .gitmux.yml with the new flags_without_count option and documentation
README.md: Added the new option to the "Additional options" table with description and default value

The flags_without_count feature is now fully implemented and documented. When enabled, it shows git status symbols without counts (e.g., ● ✚ … ⚑ instead of ● 3 ✚ 2 … 1 ⚑ 1).

Copilot finished work on behalf of arl July 31, 2025 08:31
Copy link
Owner

@arl arl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job, see the unique comment and were good to go! 🚀

README.md Outdated
@@ -272,6 +272,7 @@ This is the list of additional configuration `options`:
| `hide_clean` | Hides the clean flag entirely | `false` |
| `swap_divergence` | Swaps order of behind & ahead upstream counts | `false` |
| `divergence_space` | Add a space between behind & ahead upstream counts | `false` |
| `flags_without_count` | Show flags symbols without counts | `false` |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this option name is wider than the others, please realign the markdown table as I want the readme to be nice even when read without rendered as markdown.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the markdown table alignment in commit 6af350e. The table now has consistent spacing to accommodate the wider flags_without_count option name.

@Copilot Copilot AI requested a review from arl July 31, 2025 08:45
Copilot finished work on behalf of arl July 31, 2025 08:45
@arl arl marked this pull request as ready for review July 31, 2025 08:52
@arl arl merged commit 5538825 into main Jul 31, 2025
8 checks passed
@arl arl deleted the copilot/fix-124 branch July 31, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Ability to show icon only - no count
2 participants