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

No way to rename value names across entire struct #3709

Open
2 tasks done
epage opened this issue May 9, 2022 · 0 comments
Open
2 tasks done

No way to rename value names across entire struct #3709

epage opened this issue May 9, 2022 · 0 comments
Labels
A-derive Area: #[derive]` macro API C-bug Category: Updating dependencies E-medium Call for participation: Experience needed to fix: Medium / intermediate M-breaking-change Meta: Implementing or merging this will introduce a breaking change.
Milestone

Comments

@epage
Copy link
Member

epage commented May 9, 2022

Please complete the following tasks

Rust Version

rustc 1.57.0 (f1edd0429 2021-11-29)

Clap Version

3.1.13

Minimal reproducible code

#[derive(Parser)]
struct Args {
    hello_world: String
}

Steps to reproduce the bug with the above code

Run the --help for the above

Actual Behaviour

Its listed as HELLO_WORLD

Expected Behaviour

A way to rename it to hello-world

Additional Context

This is split out of #3282.

Proposed solution

  • Rename rename_all_env to rename_env
  • Add rename_value_name
  • Add rename_long
  • Add rename_command
  • Remove rename_all

Nothing will rename id or short.

Debug Output

No response

@epage epage added C-bug Category: Updating dependencies M-breaking-change Meta: Implementing or merging this will introduce a breaking change. E-medium Call for participation: Experience needed to fix: Medium / intermediate A-derive Area: #[derive]` macro API labels May 9, 2022
@epage epage added this to the 4.0 milestone May 9, 2022
@epage epage modified the milestones: 4.0, 5.0 Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-derive Area: #[derive]` macro API C-bug Category: Updating dependencies E-medium Call for participation: Experience needed to fix: Medium / intermediate M-breaking-change Meta: Implementing or merging this will introduce a breaking change.
Projects
None yet
Development

No branches or pull requests

1 participant