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

subcommand names on windows are strange in help #2564

Closed
2 tasks done
brennie opened this issue Jun 22, 2021 · 1 comment
Closed
2 tasks done

subcommand names on windows are strange in help #2564

brennie opened this issue Jun 22, 2021 · 1 comment

Comments

@brennie
Copy link
Contributor

brennie commented Jun 22, 2021

Please complete the following tasks

  • I have searched the discussions
  • I have searched the existing issues

Clap Version

2.33.1

Describe your use case

The help text for subcommands on windows is formatted like my-app.exe-subcommand which is strange. e.g.

use clap::*;

fn main() {
  let app = App::new("my-app")
    .bin_name("my-app.exe")  # Fake Windows platform 
    .version("1.0")
    .about("my app does stuff")
    .subcommand(App::new("test").about("test subcommand"))
    .get_matches_from(vec!["my-app", "test", "--help"]);
}

playground link

produces:

my-app.exe-test 
test subcommand

USAGE:
    my-app.exe test

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

Describe the solution you'd like

I would expect to show <command> <version> or <command> <subcommand> but not a mangled name. I'm not sure if there is an ideal here, but its very strange on windows.

Alternatives, if applicable

No response

Additional Context

No response

@pksunkara
Copy link
Member

There are two issues for this, #1431 #1382. Not sure why you are unable to see them when searching. Unless you did not search at all.

Duplicate of #1431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants