Kevin K
e5def030d3
refactor(Modules): moves the modules around into a more logical order to make contribution easier
2018-06-12 11:44:40 -04:00
Corentin Henry
4f602b7e86
replace Arg::from_usage by Arg::from
2018-04-21 11:59:19 -07:00
Kevin K
92eab59dfc
docs: Fix some typos and markdown issues.
2018-03-19 17:11:59 -04:00
etopiei
5220122f72
Adjusted error message, as specified in Issue #1160
2018-02-12 14:39:51 -05:00
Kevin K
6fc70d825c
depr(Arg.rs): adds deprecations in prep for v3
...
A full list of deprecations is:
* Arg::last -> ArgSettings::Last
* Arg::required -> ArgSettings::Required
* Arg::require_equals -> ArgSettings::RequireEquals
* Arg::allow_hyphen_values -> ArgSettings::AllowHyphenValues
* Arg::takes_value -> ArgSettings::TakesValue
* Arg::hide_possible_values -> ArgSettings::HidePossibleValues
* Arg::hide_default_value -> ArgSettings::HideDefaultValue
* Arg::multiple -> ArgSettings::Multiple (see Arg::multiple split)
* Arg::multiple -> ArgSettings::MultipleValues (see Arg::multiple split)
* Arg::multiple -> ArgSettings::MultipleOccurrences (see Arg::multiple split)
* Arg::global -> ArgSettings::Global
* Arg::empty_values -> ArgSettings::AllowEmptyValues
* Arg::hidden -> ArgSettings::Hidden
* Arg::case_insensitive -> ArgSettings::IgnoreCase
* Arg::use_delimiter -> ArgSettings::UseDelimiter
* Arg::require_delimiter -> ArgSettings::RequireDelimiter
* Arg::hide_env_values -> ArgSettings::HideEnvValues
* Arg::next_line_help -> ArgSettings::NextLineHelp
* Arg::set -> Arg::unset_setting (consistent naming with App)
* Arg::unset -> Arg::setting (consistent naming with App)
Relates to #1037
2018-02-03 15:00:55 -05:00
Kevin K
1ab10275e4
style: rustfmt run
2018-01-25 12:21:17 -05:00
Kevin K
acdbd47152
wip: changes to builders in prep for v3
2018-01-24 11:34:14 -05:00
Kevin K
eb8d919e6f
perf: further debloating by removing generics from error cases
2018-01-09 10:53:20 -05:00
Kevin K
8c0cc5c386
style: rustfmt run
2017-11-28 08:57:04 -05:00
Corentin Henry
2671ca7260
imp(Suggestions): suggests to use flag after subcommand when applicable
...
If an invalid flag is found and this flag is a valid flag for a
sub-command, suggest using it after the subcommand
fix https://github.com/kbknapp/clap-rs/issues/927
2017-06-12 08:03:14 -07:00
nate
4293013c26
clean up. fix lint and formatting.
2017-05-29 13:04:47 -04:00
nate
53e3d833f1
refactor to add ColorizeOption
2017-05-29 13:04:47 -04:00
Kevin K
e0f7722685
style: improves the style of doc tests and examples to increase readability and uniformity
2017-02-20 20:24:27 -05:00
Kevin K
65eb33859d
imp(Validators): improves the error messages for validators
...
Failing value validators now produce messages like the following:
error: Invalid value for '-j <val>': some message about the value
Closes #744
2016-11-20 08:36:26 -05:00
Kevin K
80cc68748d
chore: rustfmt run
2016-11-20 14:47:04 -05:00
Kevin K
7cb44abc09
Revert "Auto merge of #737 - kbknapp:questionmark, r=kbknapp"
...
This reverts commit f24a3760e4
, reversing
changes made to 087cee7404
.
2016-11-12 12:12:05 -05:00
Kevin K
55e7385685
style: changes try! to ? and rustfmt run
2016-11-11 15:20:07 -05:00
tormol
3ccde7a4b8
docs: reword docs for ErrorKind and app::Settings
...
Also adds a blank line between variants and
wraps markdown lines at punctuation when it makes sense. (Doesn't affect generated docs)
2016-10-16 11:31:12 +02:00
tormol
9f6217a424
docs(ErrorKind): improve some errors about subcommands
...
* InvalidSubcommand requires feature="suggestions".
* UnknownArgument can also be caused by unrecognized subcommands.
2016-10-16 11:31:12 +02:00
tormol
996fc38176
docs: fix tests that fail when the "suggestions" feature is disabled
2016-10-16 11:31:12 +02:00
tormol
af9e1a393c
docs: fix the OsString-using doc-tests
2016-10-16 11:31:12 +02:00
tormol
4c27f0ade9
tests: run OsString-using doc-tests on unix platforms
...
Closes #506
2016-10-16 11:31:12 +02:00
Kevin K
b246be1a4b
style: rustfmt run
2016-09-05 17:03:45 -04:00
Kevin K
07e6e8ea31
style: rustfmt run
2016-09-05 15:29:40 -04:00
Vinzent Steinberg
58512f2fcb
feat(Errors): Errors with custom description
...
This is useful if a more meaningful message can be displayed to the
user with `Error::exit`. For example, if a file is not found, the
converted `io::Error` will give a message like:
"error: entity not found"
With this, it is possible to replace this message with a more useful
one, like for instance:
"error: configuration file not found"
Coloring is respected. Some duplication in the `From::from` impls was
reduced.
2016-09-05 14:54:14 -04:00
Bence Szigeti
8c32b4b63f
Fix: missing color
2016-07-05 23:16:44 +02:00
Bence Szigeti
f8ca3085da
Fix: typo -- missing space and commas
2016-07-05 22:14:47 +02:00
Bence Szigeti
8d7bea823f
Fix: extra space typo removed
2016-07-05 22:01:04 +02:00
Kevin K
65c2350aa3
feat: colors dont get sent to pipes by default
...
Color are now only used when outputting to a termainal/TTY. There are three new settings as well
which can be used to control color output, they are:
* `AppSettings::ColorAuto`: The default, and will only output color when outputting to a terminal or TTY
* `AppSettings::ColorAlways`: Outputs color no matter where the output is going
* `AppSettings::ColorNever`: Never colors output
This now allows one to use things like command line options, or environmental variables to turn
colored output on/off.
Closes #512
2016-06-04 11:28:03 -04:00
Kevin K
3312893dda
docs: inter-links all types and pages
...
All doc pages should now be inter-linked between other doc pages and
Rust documentation.
Closes #505
2016-05-15 14:23:37 -04:00
Kevin K
fef11154fb
imp(Groups): formats positional args in groups in a better way
2016-05-08 21:33:27 -04:00
Kevin K
ffde90f2ba
style: rustfmt run
2016-05-06 17:52:23 -04:00
Kevin K
813d75d06f
feat(Help Message): wraps and aligns the help message of subcommands
...
Subcommand's help strings are now automatically wrapped and aligned just
like other arguments.
Closes #452
2016-03-16 10:17:00 -04:00
Kevin K
2c12757bbd
feat(Help Subcommand): adds support passing additional subcommands to help subcommand
...
The `help` subcommand can now accept other subcommands as arguments to
display their help message. This is similar to how many other CLIs
already perform. For example:
```
$ myprog help mysubcmd
```
Would print the help message for `mysubcmd`. But even more, the `help`
subcommand accepts nested subcommands as well, i.e. a grandchild
subcommand such as
```
$ myprog help child grandchild
```
Would print the help message of `grandchild` where `grandchild` is a
subcommand of `child` and `child` is a subcommand of `myprog`.
Closes #416
2016-03-14 22:41:47 -04:00
Kevin K
deace34ad2
chore: clippy run
2016-03-08 10:39:43 -05:00
Kevin K
c19a791745
imp(values): adds support for up to u64::max values per arg
2016-02-02 07:45:49 -05:00
Kevin K
ca7f197a12
refactor: minor code cleanup
2016-02-02 07:45:49 -05:00
Kevin K
90542747ac
chore: fixes doc and style mistakes
2016-01-28 21:58:40 -05:00
Kevin K
4c37b26a84
tests: fixes some failing doc tests
2016-01-28 11:45:31 -05:00
Kevin K
f1876388a7
docs: updating docs for 2x release
2016-01-28 11:45:31 -05:00
Kevin K
eb4de9215f
imp(From Usage): vastly improves the usage parser
...
Closes #350
2016-01-28 11:45:31 -05:00
Kevin K
95e8209712
feat: adds support with options with optional values
...
Closes #367
2016-01-28 11:45:31 -05:00
Kevin K
e874a0d5e0
feat(UTF-8): adds support for invalid utf8 in values
...
Closes #269
2016-01-28 11:45:31 -05:00
Kevin K
c3e96232c9
tests(v2): fixing more tests on the new v2 base
2016-01-28 11:45:31 -05:00
Kevin K
7fc18e685f
test(v2): fixing tests to pass under new v2 changes
2016-01-28 11:45:31 -05:00
Kevin K
20de5c6e76
feat(v2): implementing the base of 2.x
...
This commit implements the base changes for clap 2.x
2016-01-28 11:45:31 -05:00
Kevin K
b9ff14bfff
chore: changes build command features for Windows builds in testing
2015-12-18 09:01:59 -05:00
Sung Rim Huh
5ba8ba9dcc
fix(errors): return correct error type in WrongNumValues error builder
2015-12-10 08:40:24 -08:00
Kevin K
c4d2b17119
fix(Errors): fixes some instances when errors are missing a final newline
2015-11-20 08:23:39 -05:00
Kevin K
a35f76346f
fix(Errors): fixes a compiling bug when built on Windows or without the color feature
...
Close #345
2015-11-14 04:51:44 -05:00