Commit graph

347 commits

Author SHA1 Message Date
Kevin K
a9aae2ade4 refactor: fixes a typo in the arg settings 2015-09-30 23:59:40 -04:00
Kevin K
f1031dac13 refactor: fixes a typo in the app settings 2015-09-30 23:59:40 -04:00
Kevin K
b01667ebb3 refactor: changes some arg fields to flags internally 2015-09-30 23:59:40 -04:00
Kevin K
7005cf8c47 style: removes trailing whitespace 2015-09-30 23:59:40 -04:00
Kevin K
b733bfbb6a refactor: adds the hidden setting to AppSettings 2015-09-30 23:59:40 -04:00
Kevin K
ffae52e64b refactor: refactor app settings into flags 2015-09-30 23:59:40 -04:00
Kevin K
6f2926e794 refactor(ArgBuilders): moves creation of builders to constructors 2015-09-30 23:59:40 -04:00
Kevin K
1412e639e0 fix(Help Message): required args no longer double list in usage
Closes #277
2015-09-30 12:54:00 -04:00
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