You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.4 KiB
Markdown
42 lines
1.4 KiB
Markdown
---
|
|
# claudbg-a532
|
|
title: '`--include` help text should enumerate valid values'
|
|
status: completed
|
|
type: bug
|
|
priority: low
|
|
created_at: 2026-03-30T04:38:03Z
|
|
updated_at: 2026-03-30T05:16:36Z
|
|
parent: claudbg-tci9
|
|
---
|
|
|
|
## Problem
|
|
|
|
The `--include` flag help text says "Comma-separated content to include: thinking, output." but clap does not enumerate the valid tokens in `--help` output. Users cannot discover valid values from `--help` alone.
|
|
|
|
## Current declaration (`src/cli.rs`)
|
|
|
|
```rust
|
|
/// Comma-separated content to include: thinking, output.
|
|
#[arg(long, global = true, default_value = "")]
|
|
pub include: IncludeList,
|
|
```
|
|
|
|
The valid tokens are `thinking` and `output` (parsed in `IncludeList::from_str`).
|
|
|
|
## Expected behavior
|
|
|
|
The help output should clearly show: `[possible values: thinking, output]` or equivalent. Options:
|
|
|
|
1. Update the `#[arg(help = ...)]` string to explicitly state the valid values and format.
|
|
2. Or use clap's `value_parser` with a custom validator that also shows valid choices.
|
|
|
|
Since `IncludeList` is a comma-separated composite (not a single enum value), option 1 (explicit help string) is simplest.
|
|
|
|
## Relevant files
|
|
|
|
- `src/cli.rs` — `IncludeList`, `GlobalOpts`, the `include` field annotation
|
|
|
|
## Summary of Changes
|
|
|
|
Updated the doc comment on the --include field in src/cli.rs to explicitly enumerate valid values (thinking, output) and provide an example.
|