Kevin K
f121ae749f
fix(Possible Values): possible value validation is restored
...
Closes #287
2015-09-30 10:23:26 -04:00
Kevin K
af8bfb1610
tests(ArgGroups): adds tests for ArgGroups
...
closes #279
2015-09-28 12:29:57 -04:00
Kevin K
c92a4b9eff
feat: allows accessing arg values by group name
2015-09-28 12:22:09 -04:00
Kevin K
e17fcec53b
fix(Conflicts): fixes bug with conflicts not removing required args
...
Closes #271
2015-09-22 15:38:04 -04:00
Kevin K
87ba54451d
docs: properly names Examples section for rustdoc
2015-09-21 22:06:15 -04:00
Kevin K
c5bf7ddc8c
feat(Unicode): allows non-panicing on invalid unicode characters
2015-09-21 21:58:25 -04:00
Alexander Kuvaev
a87c5cd660
fix(ArgGroup) added asserts to help users to configure clap properly
...
Also I've added tests for this change
2015-09-21 22:33:55 +03:00
Kevin K
931aea8842
docs(Arg): unhides fields of the Arg struct
2015-09-20 20:34:20 -04:00
Alex Gulyás
cbc42a37d2
fix: flush the buffer in App::print_version()
2015-09-18 23:58:05 +02:00
Dabo Ross
ffe1458882
Replace crate_version!() macro with simpler call
...
As of https://github.com/rust-lang/cargo/pull/1094 , cargo publishes the full crate version as `CARGO_PKG_VERSION`, rather than *just* the parts of it.
This replaces the more complicated call with simply `env!("CARGO_PKG_VERSION").to_owned()`.
2015-09-12 20:22:01 -07:00
James McGlashan
13712da1d3
fix: Macro benchmarks
2015-09-10 22:23:58 +10:00
Kevin K
07f6d63e17
chore: increase version
2015-09-09 00:00:17 -04:00
Kevin K.
c0c1613188
Merge branch 'master' into issue-231
2015-09-08 22:49:07 -04:00
Kevin K
1e6403b6a8
feat(Errors): allows consumers to write to stderr and exit on error
2015-09-08 22:38:44 -04:00
Kevin K
56b95f3208
feat: allows printing help message by library consumers
2015-09-08 22:38:07 -04:00
Kevin K
f9c04aeb2c
tests(App): adds print_help test
2015-09-08 21:03:20 -04:00
Kevin K
c92a98fb67
tests(Hidden Args): fixes tests to include hidden field
2015-09-08 21:02:54 -04:00
Kevin K
2cab4d0334
feat: allows defining hidden args and subcmds
...
Closes #231
2015-09-08 20:45:14 -04:00
James McGlashan
443841b012
feat: Builder macro to assist with App/Arg/Group/SubCommand building
2015-09-08 22:53:31 +10:00
Kevin K
94003db4b5
feat: adds abiltiy not consume self when parsing matches and/or exit on help
2015-09-07 21:18:00 -04:00
Kevin K
40229efd99
style: post rustfmt run
2015-09-06 21:37:45 -04:00
Alexander Kuvaev
b9ca261634
docs(ClapErrorType): changed examples content
2015-09-06 01:44:20 +03:00
Alexander Kuvaev
dd05784327
docs: fixed ClapErrorType docs
2015-09-06 01:12:46 +03:00
Alexander Kuvaev
934e6fbb64
feat(App): Added ability for users to handle errors themselves
...
Now you can use get_matches_safe instead of get_mathces if you want
to handle errors yourself.
This will allow now to write false-negative tests and check what type
of error occurs
2015-09-06 00:17:32 +03:00
Alexander Kuvaev
afaf198504
refactor(App): Now most parser function will return Result with Err...
...
... instead of hard exiting
2015-09-05 00:32:11 +03:00
Alexander Kuvaev
f5406076de
Merge remote-tracking branch 'upstream/master' into report_error_refact
2015-09-04 22:58:25 +03:00
Kevin K
3cb4a48ebd
perf: changes ArgGroup HashSets to Vec
2015-09-04 14:05:42 -04:00
Kevin K
e1694922f5
tests: adds test for ArgGroups
2015-09-04 13:58:00 -04:00
Kevin K
32044f26e0
tests: adds tests for PosBuilder Display
2015-09-04 13:29:57 -04:00
Kevin K
3a5bb17596
tests: adds tests for FlagBuilder Display
2015-09-04 13:29:45 -04:00
Kevin K
e27a3f3146
tests: adds tests for AppSettings FromStr
2015-09-04 13:16:24 -04:00
Kevin K
baab2e3f40
perf: changes BTreeSet for Vec in some instances
2015-09-04 13:04:24 -04:00
Kevin K
cfaae03b2a
tests: adds tests for did_you_mean suggestions
2015-09-04 13:04:18 -04:00
Kevin K
63dbc5569f
tests: adds tests for colored output
2015-09-04 11:59:33 -04:00
Alexander Kuvaev
f1c5bf5511
refactor(App): report_error refactoring
2015-09-04 00:51:37 +03:00
Kevin K
82a09abb32
Merge branch 'issue-205' of https://github.com/Vinatorul/clap-rs into vin-issue-205
2015-09-01 00:05:54 -04:00
Kevin K
b17808ffbd
Merge branch 'master' into issue-80
2015-09-01 00:03:16 -04:00
Kevin K
ab41d7f382
docs(YAML): adds examples for using YAML to build a CLI
2015-08-31 23:57:35 -04:00
Kevin K
19b348a100
docs(Args from YAML): fixes doc examples
2015-08-31 23:57:35 -04:00
Kevin K
ecf88665cb
feat(ArgGroups): adds support for building ArgGroups from yaml
2015-08-31 23:57:25 -04:00
Kevin K
e415cf78ba
feat(Subcommands): adds support for subcommands from yaml
2015-08-31 23:57:16 -04:00
Kevin K
86cf4c4562
feat(YAML): allows building a CLI from YAML files
2015-08-31 23:57:16 -04:00
Kevin K
169ffec100
fix(Unified Help Messages): fixes a crash from this setting and no opts
...
Closes #210
2015-08-30 23:36:04 -04:00
Kevin K
f482387544
refactor: breaks up app code into different files
2015-08-30 17:10:26 -04:00
Kevin K
4f836ee5ef
refactor(Examples): corrects compiler warnings about names
...
Closes #204
2015-08-30 15:43:57 -04:00
Alexander Kuvaev
5a8e341e8e
refactor(ArgGroup): changed Vec<&str> using to &[&str]
2015-08-30 20:22:26 +03:00
Alexander Kuvaev
0cfecd328c
tests: moved tests from lib.rs to tests.rs and tests dir
2015-08-28 21:48:37 +03:00
Kevin K
ad962ec478
feat(Args): allows opts and args to define a name for help and usage msgs
2015-08-27 12:05:23 -04:00
Kevin K
3d5e9a6ced
fix(Possible Values): fixes a bug where suggestions arent made when using --long=value format
...
Closes #192
2015-08-26 19:49:39 -04:00
Kevin K
ff9628d24d
chore: comments out clippy until 0.0.12 is on crates.io
2015-08-26 17:32:25 -04:00
Kevin K
5aa02042ca
chore: separates nightly features from travis-cargo flags
2015-08-25 17:28:46 -04:00
Alexander Kuvaev
b41afa8c3d
fix(App, Args): fixed subcommand reqs negation
...
Closes #188
2015-08-24 14:30:33 -04:00
Alexander Kuvaev
9c135eb790
fix(App): fixed requirmets overriding
2015-08-23 01:47:19 +03:00
Alexander Kuvaev
fc7a31a745
fix: fixed confusing error message, also added test for it
2015-08-22 12:45:25 +03:00
Alexander Kuvaev
999456969d
tests: test for multiple flags in single
2015-08-22 00:04:36 +03:00
Alexander Kuvaev
56ea693084
tests: tests for flag using
2015-08-21 23:55:13 +03:00
Alexander Kuvaev
38fb26b9d7
tests: addet options values testing to some tests
2015-08-21 23:46:51 +03:00
Alexander Kuvaev
215fc821a7
tests: tests for options using
2015-08-21 23:42:47 +03:00
Alexander Kuvaev
133a26c2fb
tests: rewrote test for multiple occurrences
2015-08-20 21:52:48 +03:00
Kevin K
754d6b7dd1
tests: adds tests for posix compatible conflicts
2015-08-19 21:44:25 -04:00
Kevin K
8c2d48acf5
feat: implements posix compatible conflicts for long args
2015-08-19 21:40:06 -04:00
Kevin K.
70e48d1357
Merge pull request #177 from Vinatorul/issue176
...
Added overrides to support conflicts in POSIX compatible manner
2015-08-19 21:23:24 -04:00
Alexander Kuvaev
eed54ff836
tests: moved code from claptests to lib.rs, also moved one test
2015-08-20 00:46:06 +03:00
Alexander Kuvaev
ddc3976a58
Merge branch 'issue176' of https://github.com/Vinatorul/clap-rs into issue176
2015-08-19 20:42:52 +03:00
Alexander Kuvaev
cd6649959f
feat(Args) method to add multiple overrides at once
2015-08-19 20:37:17 +03:00
Kevin K
d715646e69
feat(Args): allows defining POSIX compatible argument conflicts
2015-08-18 23:59:04 -04:00
Kevin K
d0c3b37970
perf(Args and Apps): changes HashSet->Vec in some instances for increased performance
2015-08-18 22:04:22 -04:00
Alexander Kuvaev
5a18fa4ffe
wip: removed 'o lifetime
2015-08-18 23:53:03 +03:00
Alexander Kuvaev
92b9f8f5bf
wip: fixed docs and remove faulty #[cfg(test)] block
2015-08-18 23:27:24 +03:00
Alexander Kuvaev
0b916a00de
feat: added overrides to support conflicts in POSIX compatible manner
2015-08-18 22:33:52 +03:00
Kevin K
19c46e1403
chore: fix until clippy on crates.io is updated
2015-08-14 20:58:18 -04:00
Kevin K
0349654717
docs: updates docs for new features
2015-08-14 20:25:21 -04:00
Kevin K
4a00e2510d
imp(AppSettings): adds ability to add multiple settings at once
2015-08-14 20:17:14 -04:00
Kevin K.
3b020f9e42
Merge pull request #174 from kbknapp/issue-170
...
feat(Args): allows for custom argument value validations to be defined
2015-08-14 19:39:42 -04:00
Alexander Kuvaev
7df170d7f4
fix: fixed misspell and enum name
2015-08-15 02:11:20 +03:00
Kevin K
84ae2ddbce
feat(Args): allows for custom argument value validations to be defined
...
Closes #170
2015-08-14 18:46:13 -04:00
Alexander Kuvaev
ade367780c
docs: fixed docs for previous changes
2015-08-15 01:16:35 +03:00
Alexander Kuvaev
dc3ada7386
fix: fixed use for clap crate
2015-08-15 01:15:47 +03:00
Alexander Kuvaev
618dc4e2c2
feat: Replace application level settings with enum variants
2015-08-15 00:14:59 +03:00
Kevin K
8a2cd7f95f
imp: code corrections thanks to rust-clippy
2015-08-14 00:21:16 -04:00
Kevin K
d63c013631
fix: fixes two bugs in App when printing newlines in help and subcommands required error
2015-08-01 00:44:20 -04:00
Kevin K
93e915dfe3
perf: removes some unneeded allocations
2015-07-29 17:55:02 -04:00
Kevin K
c9195c5f92
fix(Macros): fixes a typo in a macro generated error message
2015-07-19 22:03:59 -04:00
Kevin K
fe5d95c64f
fix(Type Errors): fixes formatting of error output when failed type parsing
2015-07-19 21:52:34 -04:00
Kevin K
86c3be85fb
imp(Usage Strings): displays a [--] when it may be helpful
2015-07-19 21:52:34 -04:00
Kevin K
9cb5dceb3e
fix: fixes formatting bug which prevented compiling on windows
...
Closes #163
2015-07-18 14:31:09 -04:00
Kevin K
6d214b549a
fix: fixes a bug when parsing multiple {n} newlines inside help strings
2015-07-16 22:16:50 -04:00
Kevin K
42b6d1fc3c
fix: fixes a logic bug and allows setting Arg::number_of_values() < 2
...
Allows setting `Arg::number_of_values(qty)` where `qty` < 2. This allows
things such as `Arg::number_of_values(1)` in conjuction with
`Arg::multiple(true)` which would make invoking the program like this
`myprog --opt val --opt val` legal, but `myprog --opt val1 val2`
illegal.
Closes #161
2015-07-16 21:34:04 -04:00
Kevin K
f9800a2969
imp(Help Strings): properly aligns and handles newlines in long help strings
...
Long help strings can now be broken up with newlines that will be
properly aligned in help messages. Simply place a `{n}` wherever you'd
like the newline to appear.
Closes #145
2015-07-16 01:27:58 -04:00
Kevin K
52bcd892ea
feat: allows creating unified help messages, a la docopt or getopts
...
Allows creating help messages with a more unified look, similar to how
docopt and getopts are formatted. (i.e. flags and options are combined
into a single group)
Closes #158
2015-07-16 01:27:05 -04:00
Kevin K
336c476f63
feat: allows stating all subcommands should *not* have --version flags
...
Allows subcommands to disable the `--version` flag by using the
`App::versionless_subcommands(true)` method.
Closes #156
2015-07-16 01:26:11 -04:00
Kevin K
bc66d3c6de
feat: allows setting version number to auto-propagate through subcommands
...
The version number can now be auto-propgated down through subcommands
with the App::global_version(true) method
Closes #157
2015-07-16 01:25:14 -04:00
Severen Redwood
8889689dc6
docs: fix incorrect code example for App::subcommand_required
2015-07-15 21:54:07 -04:00
Kevin K
cc76ab8c2b
imp(Errors): writes errors to stderr
...
Closes #154
2015-07-11 11:23:48 -04:00
Kevin K
dc7e1fcea5
imp(Usage): re-orders optional arguments and required to natural standard
...
Also renamed is '[POSITIONAL]' => '[ARGS]' to use the more standard
vernacular
Closes #147
2015-07-09 09:51:57 -04:00
Kevin K
083f82d333
fix: allows empty values when using --long='' syntax
...
Closes #151
2015-07-08 14:57:28 -04:00
Kevin K
1528038fbb
chore: silence macro definition warnings
2015-07-07 20:06:15 -04:00
Kevin K
753125282b
feat: args can now be parsed from arbitrary locations, not just std::env::args()
2015-07-07 19:55:41 -04:00
Severen Redwood
3e8891c00b
Fix typos in the documentation for the clap::App
struct
2015-06-30 19:47:57 +12:00
Severen Redwood
2614a0fa8c
Fix typos in the documentation for the .help()
method
2015-06-30 19:21:30 +12:00