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

Help text doesn't line up for options that accept multiple occurrences #760

Closed
jimmycuadra opened this issue Dec 1, 2016 · 7 comments
Closed
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-bug Category: Updating dependencies
Milestone

Comments

@jimmycuadra
Copy link
Contributor

Clap version: 2.19.0

Options that allow multiple occurrences have "..." appended to them, which results in the help text for those options not lining up with the others. Note the -i and -K options below:

OPTIONS:
    -a, --ami <ami>                                EC2 AMI ID to use for all CoreOS instances, e.g. "ami-1234"
        --availability-zone <availability-zone>    Availability Zone for etcd instances and EBS volumes, e.g. "us-east-1a"
    -A, --aws-account-id <aws-account-id>          The numeric ID of the AWS account, e.g. "123456789012"
    -d, --domain <domain>                          The base domain name for the cluster, e.g. "example.com"
    -i, --iam-user <iam-user>...                      An IAM user name who will have access to cluster PKI secrets, e.g. "alice"; this option can be specified more than once
    -v, --kubernetes-version <k8s-version>         Version of Kubernetes to use, e.g. "1.0.0"
        --masters-max-size <masters-max-size>      The maximum number of EC2 instances the Kubernetes masters may autoscale to
        --masters-min-size <masters-min-size>      The minimum number of EC2 instances the Kubernetes masters may autoscale to
        --nodes-max-size <nodes-max-size>          The maximum number of EC2 instances the Kubernetes nodes may autoscale to
        --nodes-min-size <nodes-min-size>          The minimum number of EC2 instances the Kubernetes nodes may autoscale to
        --rbac-super-user <rbac-super-user>        The Kubernetes username of an administrator who will set up initial RBAC policies, e.g. "jimmy"
    -r, --region <region>                          AWS Region to create the resources in, e.g. "us-east-1"
    -s, --instance-size <size>                     EC2 instance size to use for all instances, e.g. "m3.medium"
    -K, --ssh-key <ssh-key>...                        SSH public key to add to ~/.ssh/authorized_keys on each server; this option can be specified more than once
    -z, --zone-id <zone-id>                        Route 53 hosted zone ID
@kbknapp
Copy link
Member

kbknapp commented Dec 2, 2016

Interesting, this a regression then and I'd thought I tested against it. Let me see if I can reproduce and I'll post back!

@kbknapp
Copy link
Member

kbknapp commented Dec 2, 2016

@jimmycuadra I'm not able to reproduce this, could you like to the source that's causing it? If you look at tests/help.rs maybe you could also see if there's something you're doing differently than the tests?

@jimmycuadra
Copy link
Contributor Author

Here is the clap code that produces the help output I pasted: https://github.com/InQuicker/kaws/blob/9c8786aebaca68bff3637973a7c6c8bf54697dda/src/cli.rs

@kbknapp
Copy link
Member

kbknapp commented Dec 2, 2016

Ah ok, interesting, so it appears it only happens when those args are part of a subcommand. I've reproduced it, and should have it fixed soon 😉

@kbknapp kbknapp added A-help Area: documentation, including docs.rs, readme, examples, etc... C: subcommands C-bug Category: Updating dependencies labels Dec 2, 2016
@kbknapp kbknapp added this to the 2.19.1 milestone Dec 2, 2016
@kbknapp
Copy link
Member

kbknapp commented Dec 2, 2016

The pot thickens, it's not because of subcommands at all. It's because of the line number_of_values(1) Should have this fixed momentarily!

@kbknapp
Copy link
Member

kbknapp commented Dec 2, 2016

This is fixed in #762 and once that merges I'll upload v2.19.1 to crates.io

@jimmycuadra
Copy link
Contributor Author

You're amazing, as always. ❤️

@homu homu closed this as completed in cd94b31 Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-bug Category: Updating dependencies
Projects
None yet
Development

No branches or pull requests

2 participants