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

Add support for next line help #427

Closed
kbknapp opened this issue Feb 17, 2016 · 0 comments
Closed

Add support for next line help #427

kbknapp opened this issue Feb 17, 2016 · 0 comments
Labels
A-builder Area: Builder API A-help Area: documentation, including docs.rs, readme, examples, etc...

Comments

@kbknapp
Copy link
Member

kbknapp commented Feb 17, 2016

Add support, either by arg, or as a program whole for displaying the help string on the next line indented by one tab.

    -a, --some-long-option <with> <values>    Some really long explanation about how to use this argument and other documenation

Would be come

    -a, --some-long-option <with> <values>
         Some really long explanation about how to use this argument and other documenation
@kbknapp kbknapp added C: args A-help Area: documentation, including docs.rs, readme, examples, etc... A-builder Area: Builder API labels Feb 17, 2016
kbknapp added a commit that referenced this issue Feb 18, 2016
Adds a setting for both `AppSettings` and an `Arg` method which allows
placing the help text for a particular argument (or all arguments via
the `AppSettings`) on the line after the argument itself and indented
once.

This is useful for when a single argument may have a very long
invocation flag, or many value names which throws off the alignment of
al other arguments. On a small terminal this can be terrible. Placing
the text on the line below the argument solves this issue. This is also
how many of the GNU utilities display their help strings for individual
arguments.

The final caes where this can be hepful is if the argument has a very
long or detailed and complex help string that will span multiple lines.
It can be visually more appealing and easier to read when those lines
don't wrap as frequently since there is more space on the next line.

Closes #427
@kbknapp kbknapp mentioned this issue Feb 18, 2016
29 tasks
homu added a commit that referenced this issue Feb 19, 2016
Issue 421, 427, and 429

This PR adds better examples for `Arg` methods as well as

* implements support for displaying the help on the next line (#427)
* Clarifies `AppSettings` propagation rules (#429)
* Fixes failing clippy lints
* Moves github specific files to a `.github` directory

----

Copied from #421

- [x] `short`
- [x] `long`
- [x] `help`
- [x] `required`
- [x] `conflicts_with`
- [x] `conflicts_with_all`
- [x] `overrides_with`
- [x] `overrides_with_all`
- [x] `requires`
- [x] `requires_all`
- [x] `takes_value`
- [x] `index`
- [x] `multiple`
- [x] `global`
- [x] `empty_values`
- [x] `hidden`
- [x] `possible_values`
- [x] `possible_value`
- [x] `group`
- [x] `number_of_values`
- [x] `validator`
- [x] `max_values`
- [x] `min_values`
- [x] `use_delimiter`
- [x] `value_delimiter`
- [x] `value_names`
- [x] `value_name`
- [x] `default_value`
- [x] `next_line_help`
homu added a commit that referenced this issue Feb 19, 2016
Issue 421, 427, and 429

This PR adds better examples for `Arg` methods as well as

* implements support for displaying the help on the next line (#427)
* Clarifies `AppSettings` propagation rules (#429)
* Fixes failing clippy lints
* Moves github specific files to a `.github` directory

----

Copied from #421

- [x] `short`
- [x] `long`
- [x] `help`
- [x] `required`
- [x] `conflicts_with`
- [x] `conflicts_with_all`
- [x] `overrides_with`
- [x] `overrides_with_all`
- [x] `requires`
- [x] `requires_all`
- [x] `takes_value`
- [x] `index`
- [x] `multiple`
- [x] `global`
- [x] `empty_values`
- [x] `hidden`
- [x] `possible_values`
- [x] `possible_value`
- [x] `group`
- [x] `number_of_values`
- [x] `validator`
- [x] `max_values`
- [x] `min_values`
- [x] `use_delimiter`
- [x] `value_delimiter`
- [x] `value_names`
- [x] `value_name`
- [x] `default_value`
- [x] `next_line_help`
homu added a commit that referenced this issue Feb 19, 2016
Issue 421, 427, and 429

This PR adds better examples for `Arg` methods as well as

* implements support for displaying the help on the next line (#427)
* Clarifies `AppSettings` propagation rules (#429)
* Fixes failing clippy lints
* Moves github specific files to a `.github` directory

----

Copied from #421

- [x] `short`
- [x] `long`
- [x] `help`
- [x] `required`
- [x] `conflicts_with`
- [x] `conflicts_with_all`
- [x] `overrides_with`
- [x] `overrides_with_all`
- [x] `requires`
- [x] `requires_all`
- [x] `takes_value`
- [x] `index`
- [x] `multiple`
- [x] `global`
- [x] `empty_values`
- [x] `hidden`
- [x] `possible_values`
- [x] `possible_value`
- [x] `group`
- [x] `number_of_values`
- [x] `validator`
- [x] `max_values`
- [x] `min_values`
- [x] `use_delimiter`
- [x] `value_delimiter`
- [x] `value_names`
- [x] `value_name`
- [x] `default_value`
- [x] `next_line_help`
@homu homu closed this as completed in 066df74 Feb 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-builder Area: Builder API A-help Area: documentation, including docs.rs, readme, examples, etc...
Projects
None yet
Development

No branches or pull requests

1 participant