epage / clapng

A full featured, fast Command Line Argument Parser for Rust
docs.rs/clap
Apache License 2.0
0 stars 0 forks source link

Flag SubCommands in YAML? #236

Open epage opened 2 years ago

epage commented 2 years ago

Issue by epage Tuesday Nov 09, 2021 at 16:18 GMT Originally opened as https://github.com/clap-rs/clap/issues/3011


Discussed in https://github.com/clap-rs/clap/discussions/3010

Originally posted by **Kibouo** November 9, 2021 I saw that #1974 added support for sub-commands with a flag-format. However, they don't seem to be available when ingesting YAML? I tried the following: ```yaml [...] subcommands: - web: about: "web subcommand" short_flag: W long_flag: web [...] ``` However, the keys `short_flag` and `long_flag` are silently ignored. Meaning, `cargo run -- --help` shows only `web` as a sub-command. I expected it to show `-W, --web, web`.