Skip to content
This repository was archived by the owner on Jan 1, 2022. It is now read-only.
This repository was archived by the owner on Jan 1, 2022. It is now read-only.

Flag SubCommands in YAML? #236

@epage

Description

@epage

Issue by epage
Tuesday Nov 09, 2021 at 16:18 GMT
Originally opened as clap-rs/clap#3011


Discussed in clap-rs/clap#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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions