Kevin K
c2e03a0a4e
feat: adds support for comma separated values
...
This commit adds support for values separated by commas such as
--option=val1,val2,val3. It also includes support for uses
without the equals and shorts (both with and without)
--option=val1,val2
--option val1,val2
-oval1,val2
-o=val1,val2
-o val1,val2
Closes #348
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
0eba835968
tests: updated python tests to v2 info
2016-01-28 11:45:31 -05:00
Kevin K
d707fa0fad
tests(v2): updating yaml tests to new v2 base
2016-01-28 11:45:31 -05:00
Kevin K
0410873d8d
chore: clippy run
2016-01-28 11:45:31 -05:00
Kevin K
bb52d2d194
chore: removes unneeded function
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
0031d78564
refactor(v2): improving macros for code dedup
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
d3a4834225
chore: fix failing nightly
2016-01-27 10:09:29 -05:00
messense
f0a0e4df50
docs(App) Fix App.print_help documentation
2016-01-10 16:44:24 +08:00
Kevin K
c9bf7e4440
fix: fixes an issue where invalid short args didn't cause an error
...
Closes #368
2016-01-03 22:54:13 -05:00
Kevin K
8f3817f665
fix: prints the name in version and help instead of binary name
2016-01-03 22:51:01 -05:00
Kevin K
55041bc878
chore: updates clippy
2015-12-19 05:35:44 -05:00
Kevin K
faad83fbef
fix: ArgRequiredElseHelp setting now takes precedence over missing required args
...
Closes #362
2015-12-17 23:51:57 -05:00
Kevin K
99cdebc23d
imp: clippy improvements
2015-12-08 05:17:30 -05:00
Kevin K
f03b88a976
fix(Required Args): fixes a bug where required args are not correctly accounted for
...
Closes #343
2015-11-13 09:34:26 -05:00
Kevin K
8988853fb8
imp(ArgMatcher): huge refactor and deduplication of code
...
Tons of code has been moved into functions, deduplicated, made much
easier to read, maintain, and understand. Comments still need to be
added, but that will happen shortly. Modules have also been moved around
to follow Rust conventions and best practices.
All functionality remains exactly the same
2015-11-11 10:26:05 -05:00
Kevin K
5800cdec6d
imp(Traits): refactoring some configuration into traits
...
There is now an AnyArg trait which lets you (clap dev, not consumer) get
info about certain args regardless of their type. Allows more generic
and de-duplicated code
2015-11-11 08:48:34 -05:00
Kevin K
1b69ca4bee
refactor: moves code for ergonomics
2015-11-09 03:48:49 -05:00
Kevin K
bf4d8417b8
style: rustfmt run
2015-11-09 02:22:12 -05:00
Kevin K
c6858f7875
fix: fixes a bug with required positional args in usage strings
2015-11-09 02:01:21 -05:00
Kevin K
447786ed8a
refactor(Usage): fixes some error handling duplication
2015-11-08 09:55:02 -05:00
Kevin K
bc4495b32e
perf(App): more BTreeMap->Vec, Opts and SubCmds
2015-11-08 03:48:13 -05:00
Kevin K
d357640fab
perf(App): changes flags BTreeMap->Vec
2015-11-08 01:50:12 -05:00
Kevin K
78971fd68d
perf(App): removed unneeded BTreeMap
2015-11-08 01:08:06 -05:00
Kevin K
64b921d087
perf(App): changes BTreeMap to VecMap in some instances
2015-11-08 01:01:11 -05:00
Kevin K
111745c937
chore: updates clippy
2015-11-07 00:08:15 -05:00
Kevin K
cdc29175bc
imp: massive errors overhaul
2015-11-03 08:26:17 -05:00
Kevin K
e59bc0c160
imp(Errors): errors have been vastly improved
2015-11-03 02:09:49 -05:00
Kevin K
ec0089d42e
perf(App): removed excess clones
2015-11-03 02:07:57 -05:00
Kevin K
89b51fdf8b
fix(Error Status): fixes bug where --help and --version return non-zero exit code
2015-11-02 22:56:05 -05:00
Ben S
00b61ae226
Fix a bunch of typos in comments
2015-11-01 14:02:37 +00:00
Kevin K
27df8b9d98
fix(Versionless SubCommands): fixes a bug where the -V flag was needlessly built
...
Closes #329
2015-10-29 00:23:09 -04:00
Kevin K
e639adad22
style: removes commented out code
2015-10-28 11:00:31 -04:00
Kevin K
d0c13d2960
style: rustfmt run
2015-10-28 10:56:10 -04:00
Kevin K
f161ffa470
chore: updates and implements lint findings
2015-10-28 10:55:26 -04:00
Kevin K
aff89d579b
feat: allows parsing without a binary name for daemons and interactive CLIs
...
Closes #318
2015-10-28 06:45:49 -04:00
Kevin K
c47025dca2
fix(Safe Matches): using 'safe' forms of the get_matches family no longer exit the process
...
Closes #256
2015-10-28 05:55:04 -04:00
Kevin K
c9a9548a8f
fix(Option Args): fixes bug with args and multiple values
...
Closes #323
2015-10-28 04:54:28 -04:00
Kevin K
e3be87cfc0
fix(Help and Version): only builds help and version once
2015-10-28 00:25:40 -04:00
Kevin K
34ce59ede5
fix(Errors): tones down quoting in some error messages
...
Closes #309
2015-10-13 13:46:35 -04:00
Kevin K
c78ce128eb
fix: fixes crash on invalid arg error
2015-10-06 15:08:59 -04:00
Kevin K
6b90f1adad
refactor(Errors): refactors how errors are created for deduplication
...
Closes #277
2015-10-05 21:47:39 -07:00
Kevin K
2a223dad82
fix(Unified Help): sorts both flags and options as a unified category
2015-10-05 20:36:30 -04:00
Georg Brandl
e73b07e194
fix: grammar error in some conflicting option errors
2015-10-04 10:43:59 +02:00
Kevin K
72b453dc17
fix(Usage): fixes a bug where required args aren't filtered properly
...
Closes #277
2015-10-03 09:22:15 -04:00
Kevin K
0e3733e4fe
feat: supports -aValue style options
2015-10-02 16:46:37 -04:00
Kevin K
0005154bcb
Merge branch 'master' into issue-278
2015-10-01 14:28:09 -04:00
Kevin K
27018b1821
feat(Trailing VarArg): adds opt-in setting for final arg being vararg
...
Closes #278
2015-10-01 14:18:17 -04:00
Kevin K
aaf0d6fe7a
fix(Usage Strings): fixes a bug ordering of elements in usage strings
...
Closes #298
2015-10-01 12:33:37 -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
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
Alex Gulyás
cbc42a37d2
fix: flush the buffer in App::print_version()
2015-09-18 23:58:05 +02: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
2cab4d0334
feat: allows defining hidden args and subcmds
...
Closes #231
2015-09-08 20:45:14 -04: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
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
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
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
f482387544
refactor: breaks up app code into different files
2015-08-30 17:10:26 -04:00