Skip to content

feat: add abbreviate home option to Current Working Directory widget#144

Open
Jaahuo wants to merge 1 commit intosirmalloc:mainfrom
Jaahuo:feat/cwd-abbreviate-home
Open

feat: add abbreviate home option to Current Working Directory widget#144
Jaahuo wants to merge 1 commit intosirmalloc:mainfrom
Jaahuo:feat/cwd-abbreviate-home

Conversation

@Jaahuo
Copy link

@Jaahuo Jaahuo commented Jan 25, 2026

Closes #125

Summary

  • Add a new 'abbreviate home' toggle (h key) to the Current Working Directory widget
  • Replaces the home directory path with ~ (e.g., /Users/matt/Projects~/Projects)
  • Can be combined with segments for paths like ~/.../Projects/my-project
  • Mutually exclusive with fish-style abbreviation
  • Includes tests for the new functionality

Test plan

  • Run bun test to verify all tests pass
  • Launch TUI with bun run start and add Current Working Directory widget
  • Toggle abbreviate home with 'h' key and verify preview shows ~ prefix
  • Verify abbreviate home is disabled when fish-style is enabled
  • Test combination of abbreviate home + segments

🤖 Generated with Claude Code

Add a new 'abbreviate home' toggle (h key) that replaces the home
directory path with ~ (e.g., /Users/matt/Projects → ~/Projects).

- Can be combined with segments for paths like ~/.../Projects/my-project
- Mutually exclusive with fish-style abbreviation
- Includes tests for the new functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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 request: abbreviate user's home directory as ~

1 participant

Comments