mirror of
https://github.com/jarrodwatts/claude-hud.git
synced 2026-05-21 23:52:45 +00:00
feat: add showProject config to hide project name from statusline
Adds `display.showProject` (default: true) to control whether the project path is displayed. When set to false, the project name and its associated git info are hidden from both compact and expanded layouts.
This commit is contained in:
@@ -141,6 +141,14 @@ test('renderSessionLine omits project name when cwd is undefined', () => {
|
||||
assert.ok(line.includes('[Opus]'));
|
||||
});
|
||||
|
||||
test('renderSessionLine omits project name when showProject is false', () => {
|
||||
const ctx = baseContext();
|
||||
ctx.stdin.cwd = '/Users/jarrod/my-project';
|
||||
ctx.config.display.showProject = false;
|
||||
const line = renderSessionLine(ctx);
|
||||
assert.ok(!line.includes('my-project'), 'should not include project name when showProject is false');
|
||||
});
|
||||
|
||||
test('renderSessionLine displays git branch when present', () => {
|
||||
const ctx = baseContext();
|
||||
ctx.stdin.cwd = '/tmp/my-project';
|
||||
|
||||
Reference in New Issue
Block a user