Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag SubCommands in YAML? #3011

Closed
epage opened this issue Nov 9, 2021 Discussed in #3010 · 1 comment
Closed

Flag SubCommands in YAML? #3011

epage opened this issue Nov 9, 2021 Discussed in #3010 · 1 comment
Labels
C-bug Category: Updating dependencies

Comments

@epage
Copy link
Member

epage commented Nov 9, 2021

Discussed in #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:

[...]
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.

@epage epage added C-bug Category: Updating dependencies C: yaml parser labels Nov 9, 2021
@epage
Copy link
Member Author

epage commented Dec 8, 2021

We have decided to deprecate the YAML API. For more details, see #3087. If there is interest in a YAML API, it will likely be broken out into a clap_yaml and developed independent from the core of clap.

@epage epage closed this as completed Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Updating dependencies
Projects
None yet
Development

No branches or pull requests

1 participant