Reject subcommands that contain spaces in them
Open
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
It's rather surprising that we can do this:
```
use argh::FromArgs;
#[derive(FromArgs)]
#[argh(description="")]
struct Cmd {
#[argh(subcommand)]
_sub: SubCmd,
}
#[derive(FromArgs)]
#[argh(subcommand, name = "sub sub", description="")]
struct SubCmd {}
fn main() {
let _cmd: Cmd = argh::from_env();
}
```
We can then execute this by running `cargo run -- "sub sub"`. We should probably explicitly reject this.
Contributor guide
Assessment
This issue has not been assessed yet.