ccstatusline icon indicating copy to clipboard operation
ccstatusline copied to clipboard

Feature Request: make "Current working dir" smarter & more flexible

Open bartkummel opened this issue 5 months ago • 4 comments

Currently, it shows cwd: /full/path/that/can/be/very/long/

While this might be useful for some, it takes up a lot of space. I propose:

  • Replace cwd: with a NerdFonts folder icon
  • Show only the last 1 or 2 levels (configurable), prepended with ...

bartkummel avatar Jun 23 '26 10:06 bartkummel

The configurable truncation you're after already exists. Here's how to set it up:

1. Launch the config tool:

npx -y ccstatusline@latest

or

bunx -y ccstatusline@latest

2. Open the editor for the status line containing the Current Working Dir widget, then move the highlight onto that widget.

3. Press s (segments), type 1 or 2, then Enter:

Segments Result
1 .../my-project
2 .../Projects/my-project

4. (Optional) Press h to collapse your home folder to ~ → ~/.../my-project

5. (Optional) Press r (raw value) to drop the cwd: label entirely.

Combining segments + raw value gives something like .../my-project — short path, no cwd: prefix.

LegalBark avatar Jun 23 '26 21:06 LegalBark

Follow-up: there's now a PR for the icon — #479 adds an optional folder glyph to this widget, off by default. Together with the existing segments and raw-value options, that should cover the request here.

CorticalCode avatar Jun 23 '26 22:06 CorticalCode

Great, thanks for your quick reply! I wasn't aware that the menu had context-dependent options once you select a widget. Maybe you could find a way to make that pop out a bit more? That would increase the discoverability for new users.

bartkummel avatar Jun 24 '26 06:06 bartkummel

Merged in #479 and it'll be published in the next release. The rest of the functionality is already built-in as @LegalBark has noted.

sirmalloc avatar Jun 30 '26 17:06 sirmalloc