-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
A-completionArea: completion generatorArea: completion generatorC-bugCategory: bugCategory: bugE-mediumCall for participation: Experience needed to fix: Medium / intermediateCall for participation: Experience needed to fix: Medium / intermediate
Description
Please complete the following tasks
- I have searched the discussions
- I have searched the open and rejected issues
Rust Version
rustc 1.91.0-nightly (9eb4a2652 2025-08-18)
Clap Version
clap_complete_nushell = "4.5.8", clap = "4.5.46", clap_complete = "4.5.57"
Minimal reproducible code
use clap::CommandFactory;
use clap_complete::aot::generate;
#[derive(clap::Parser)]
struct Args {
#[arg(long = "nested.option")]
pub nested_option: Option<u64>,
}
fn main() {
generate(
clap_complete_nushell::Nushell,
&mut Args::command(),
"repro",
&mut std::io::stdout(),
);
}
Steps to reproduce the bug with the above code
cargo r
Actual Behaviour
module completions {
export extern repro [
--nested.option: string
--help(-h) # Print help
]
}
export use completions *
generated completion is not valid nushell:
Error: nu::parser::parse_mismatch
× Parse mismatch during operation.
╭─[entry #1:2:5]
1 │ export extern repro [
2 │ --nested.option: string
· ───────┬───────
· ╰── expected valid variable name for this long flag
3 │ --help(-h) # Print help
╰────
Expected Behaviour
Not sure what the valid generation for this option's completion will be(i will try to look into this soon), but whatever is generated should be valid nushell.
Additional Context
No response
Debug Output
No response
Metadata
Metadata
Assignees
Labels
A-completionArea: completion generatorArea: completion generatorC-bugCategory: bugCategory: bugE-mediumCall for participation: Experience needed to fix: Medium / intermediateCall for participation: Experience needed to fix: Medium / intermediate