feat(git): fish-style abbreviation for branch and worktree names
Author: axisrowCreated Sep 27, 2026Updated Sep 27, 2026
Feature request
Fish-style abbreviation for the Git Branch and Git Worktree widgets: collapse every name segment but the last to its first character, the same way the Current Working Dir widget's fish-style mode shortens paths.
| Current | Fish-style |
|---|---|
⎇ main |
⎇ m |
⎇ feature/worktree |
⎇ f/worktree |
⎇ fix/np/story |
⎇ f/p/story |
dir/wt |
d/wt |
Motivation
- The full path widgets already have this mode (
Current Working Dir→(f)ish style), so abbreviated branches would keep the status line visually consistent. - Branch names like
fix/np/story-123are long;f/p/story-123keeps the distinguishing tail while cutting most of the width. - It would be off by default (a per-widget toggle,
(f)in the widget editor,metadata.fishStyle), so nothing changes for existing setups.
Notes
- The repo-link feature keeps the full branch name in the URL; only the visible label is abbreviated.
maxWidthcontinues to apply on top of the abbreviated text.
Happy to send a PR — a working implementation with tests is ready.
Source: sirmalloc/ccstatusline