feat(display): add include_cwd_prefix toggle (#1221)#1229
Conversation
Add a [display] include_cwd_prefix config knob (default true) that gates the "[<cwd-basename>]" prefix on the tmux terminal title (set-titles-string). The default preserves the historical "[<project>] <name>" format; set it to false to show only the session title. - DisplaySettings.IncludeCwdPrefix (*bool) + GetIncludeCwdPrefix(), default true - tmux: package-level hideCwdPrefixInTitle flag gates set-titles-string at the single format site; set once at TUI startup from the resolved user config - tests: getter default, TOML decode, and title-builder prefix on/off Implements asheshgoplani#1221
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR adds an optional TOML configuration setting ChangesCWD prefix title configuration
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Implements #1221.
Adds a
[display] include_cwd_prefixconfig knob (defaulttrue) that gates the[<cwd-basename>]prefix on the terminal title (set-titles-string). The default preserves the current[<project>] <name>format; set it tofalseto show only the session title.Per the issue thread, the prefix is gated at the single place the title is formatted (
buildTerminalTitleArgs), driven by config resolved once at startup.Changes
DisplaySettings.IncludeCwdPrefix *bool+GetIncludeCwdPrefix()— defaults totrue.internal/tmux: package-levelhideCwdPrefixInTitleflag gates theset-titles-stringvalue;SetHideCwdPrefixInTitle(...)is called once at TUI startup fromcfg.Display.GetIncludeCwdPrefix().Behavior
Default is
true, so existing setups are unchanged. To opt out:Summary by CodeRabbit
include_cwd_prefixto control whether terminal and pane titles include the current working directory basename prefix. This setting defaults totruefor backward compatibility and can be disabled to display cleaner terminal titles with only the display name.