-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Issue 421, 427, and 429 #425
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @sru (yo-bot has picked a reviewer for you, use r? to override) |
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
force-pushed
the
issue-421
branch
2 times, most recently
from
February 18, 2016 08:03
e03f647
to
ad79d08
Compare
kbknapp
force-pushed
the
issue-421
branch
3 times, most recently
from
February 18, 2016 11:06
e0dae2c
to
6942ede
Compare
@homu r+ |
📌 Commit d0c956c has been approved by |
homu
added a commit
that referenced
this pull request
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`
☀️ Test successful - status |
👀 Test was successful, but fast-forwarding failed: 422 Required status check "continuous-integration/appveyor/pr" is pending |
@homu retry |
homu
added a commit
that referenced
this pull request
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 pull request
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`
☀️ Test successful - status |
29 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds better examples for
Arg
methods as well asAppSettings
propagation rules (Clarify documentation regarding AppSettings and child subcommand propagation #429).github
directoryCopied from #421
short
long
help
required
conflicts_with
conflicts_with_all
overrides_with
overrides_with_all
requires
requires_all
takes_value
index
multiple
global
empty_values
hidden
possible_values
possible_value
group
number_of_values
validator
max_values
min_values
use_delimiter
value_delimiter
value_names
value_name
default_value
next_line_help