Conversation
Add a fishStyle metadata option (editor keybind (f)) to Git Branch: every branch segment but the last collapses to its first character, so 'main' renders as 'm' and 'fix/np/story' as 'f/p/story'. Mirrors the existing fish-style mode of Current Working Dir. Link targets keep the full branch name; the TUI preview reflects the mode. Co-Authored-By: Claude Code <noreply@anthropic.com>
Same fishStyle option as Git Branch (editor keybind (f)): every worktree name segment but the last collapses to its first character, so 'main' renders as 'm' and 'dir/wt' as 'd/wt'. Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
Closes #613
Problem
Branch and worktree names render at full length, so a status line carrying
⎇ fix/np/story-123 𖠰 dir/wtspends a lot of width on segments that mostly serve as a prefix. The Current Working Dir widget already has a fish-style mode that collapses path segments, but the git name widgets have no equivalent — and their default rendering is inconsistent with a fish-style cwd next to them.Fix
Adds a per-widget fish-style mode to both Git Branch and Git Worktree (off by default, editor keybind
(f)ish style, stored asmetadata.fishStyle):main→m,feature/worktree→f/worktree,fix/np/story→f/p/story, worktreedir/wt→d/wt;maxWidthstill applies on top of the abbreviated text.Verification
GitBranch.test.ts(plain and slashed branches, editor modifier + keybind) andGitWorktree.test.ts(main and nested worktrees, editor modifier + keybind).bun run lintclean.⎇ m 𖠰 mwith both toggles enabled,⎇ f/git-branch-fish-styleon a long-running branch name.🤖 Generated with Claude Code