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 Formatting for Multiple Args is Incorrectly Indented #513

Closed
mitsuhiko opened this issue May 28, 2016 · 7 comments
Closed

Help Formatting for Multiple Args is Incorrectly Indented #513

mitsuhiko opened this issue May 28, 2016 · 7 comments
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-bug Category: Updating dependencies

Comments

@mitsuhiko
Copy link
Contributor

Example:

ARGS:
    <VERSION>    The version identifier of the release to use
    <FILES>...      The files to upload

It seems like it adds the three dots to it.

@kbknapp
Copy link
Member

kbknapp commented May 30, 2016

Ah yes this was a recent change and I didn't change the formatting thanks for filing this! I'm on vacation, so it may be a few days until I get to this but it'll be a quick fix once I get home.

@kbknapp kbknapp added C-bug Category: Updating dependencies P2: need to have A-help Area: documentation, including docs.rs, readme, examples, etc... labels May 30, 2016
@kbknapp
Copy link
Member

kbknapp commented May 30, 2016

I'm not able to reproduce this one.

Could you send me either which version of clap this is, or the output of --help when compiled with features = ["debug"]?

@mitsuhiko
Copy link
Contributor Author

mitsuhiko commented Aug 3, 2016

Happens with current version of clap:

pub fn make_app<'a, 'b: 'a>() -> App<'a, 'b> {
    App::new("blah")
        .setting(AppSettings::UnifiedHelpMessage)
        .arg(Arg::with_name("command")
             .value_name("command")
             .help("Command to execute"))
        .arg(Arg::with_name("args")
             .value_name("args")
             .multiple(true)
             .required(false)
             .help("Arguments to the command"))
}

@mitsuhiko
Copy link
Contributor Author

Results in this:

ARGS:
    <command>    Command to execute
    <args>...       Arguments to the command

@mitsuhiko
Copy link
Contributor Author

With debug output:

**DEBUG** fn=get_matches_with;
**DEBUG** fn=create_help_and_version;
**DEBUG** Building --help
**DEBUG** Building --version
**DEBUG** Begin parsing '"--help"' ([45, 45, 104, 101, 108, 112])
**DEBUG** Starts new arg...Yes
**DEBUG** fn=parse_long_arg;
**DEBUG** Does it contain '='...No
**DEBUG** Found valid flag '--help'
**DEBUG** Checking if --help is help or version...Help
**DEBUG** fn=Help::write_parser_help;
**DEBUG** fn=Help::write_parser_help;
**DEBUG** exec=color;
**DEBUG** Color setting...Auto
**DEBUG** fn=Help::new;
**DEBUG** fn=Help::write_help;
**DEBUG** fn=write_default_help;
**DEBUG** fn=create_usage_no_title;
**DEBUG** args_in_groups=[]
**DEBUG** exec=needs_flags_tag;
**DEBUG** iter;f=hclap_help;
**DEBUG** iter;f=vclap_version;
**DEBUG** fn=groups_for_arg;
**DEBUG** No groups defined
**DEBUG** Arg not required...
**DEBUG** fn=groups_for_arg;
**DEBUG** No groups defined
**DEBUG** Arg not required...
**DEBUG** fn=write_args;
**DEBUG** fn=write_arg;
**DEBUG** fn=short;
**DEBUG** fn=long;
**DEBUG** macro=write_spaces!;
**DEBUG** fn=val;
**DEBUG** fn=help;
**DEBUG** fn=spec_vals;
**DEBUG** Writing values
**DEBUG** Term width...238
**DEBUG** Too long...false
**DEBUG** Too long...No
**DEBUG** fn=write_arg;
**DEBUG** fn=short;
**DEBUG** fn=long;
**DEBUG** macro=write_spaces!;
**DEBUG** fn=val;
**DEBUG** fn=help;
**DEBUG** fn=spec_vals;
**DEBUG** Writing values
**DEBUG** Term width...238
**DEBUG** Too long...false
**DEBUG** Too long...No
**DEBUG** fn=write_arg;
**DEBUG** fn=short;
**DEBUG** fn=long;
**DEBUG** fn=val;
**DEBUG** macro=write_spaces!;
**DEBUG** fn=help;
**DEBUG** fn=spec_vals;
**DEBUG** Writing values
**DEBUG** Term width...238
**DEBUG** Too long...false
**DEBUG** Too long...No
**DEBUG** fn=write_arg;
**DEBUG** fn=short;
**DEBUG** fn=long;
**DEBUG** fn=val;
**DEBUG** macro=write_spaces!;
**DEBUG** fn=help;
**DEBUG** fn=spec_vals;
**DEBUG** Writing values
**DEBUG** Term width...238
**DEBUG** Too long...false
**DEBUG** Too long...No

@kbknapp
Copy link
Member

kbknapp commented Aug 26, 2016

@mitsuhiko is this still the case with the latest 2.10.4?

@kbknapp
Copy link
Member

kbknapp commented Sep 12, 2016

I'm going to close this issue since I can't seem to reproduce in current version. Please let me know if this still an issue and we can re-open.

@kbknapp kbknapp closed this as completed Sep 12, 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