Commit graph

2867 commits

Author SHA1 Message Date
spease
d983649822 Explicitly mention doc comments in flatten error (#118) 2018-06-18 18:34:33 +02:00
Kevin K
05c8ab8646
Merge pull request #1296 from kbknapp/v3-dev
refactor(Modules): moves the modules around into a more logical order…
2018-06-12 11:47:26 -04:00
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
Kevin K
b7704575f7
Merge pull request #1295 from kbknapp/v3-dev
updates v3 to latest v2 changes and fixes
2018-06-12 10:26:15 -04:00
Kevin K
b033bb5abc
chore: ordermap to indexmap 2018-06-12 10:22:18 -04:00
Kevin K
b7e38fb62a
chore: update deps 2018-06-12 10:18:16 -04:00
Kevin K
c010a9d445
chore: removes doc profile 2018-06-12 10:10:03 -04:00
Kevin K
746640fafb
imp(Help): always uses long about with the main help message in subcommands. Thanks to @savish 2018-06-12 10:09:34 -04:00
Alan K
df35813d17
fix: fixes compilation errors form cherry picked commits 2018-06-12 10:04:24 -04:00
Kevin K
24d5fb3202 test: Added regression tests for Issue 897 2018-06-12 10:01:42 -04:00
Kevin K
b4b4ab629d chore: forgot pre html tag 2018-06-12 09:55:44 -04:00
Kevin K
af3264d559 Merge pull request #1272 from bspeice/patch-1
examples: Method rename
2018-06-12 09:54:19 -04:00
Kevin K
4ebede6d9a Merge pull request #1271 from stevepentland/wasm-windows-fix
Include guards around os-specific string elements.
2018-06-12 09:53:22 -04:00
Kevin K
abd7be3362 Merge pull request #1247 from tormol/osstringext_cleanup
Remove unused or unnecessary methods from osstringext
2018-06-12 09:51:07 -04:00
Guillaume P
18192d8e50
Add a minimum rustc version policy (#116)
Fix #115
2018-06-07 15:04:37 +02:00
Guillaume P
de7fc7a08e fmt 2018-06-05 18:16:17 +02:00
Guillaume P
17bfde098d v0.2.9 2018-06-05 17:46:46 +02:00
Kevin K
b46297ef65
Merge pull request #1279 from zayenz/fix-compilation-error
fix(benches): Fix compilation error
2018-05-30 14:59:15 -04:00
Mikael Zayenz Lagerkvist
d83debd745 fix(benches): Fix compilation error 2018-05-29 18:24:40 +02:00
Frank Benkstein
100d88fb8a fully qualify StructOpt when flattening (#112) 2018-05-24 15:44:00 +02:00
Kevin K
3b633e68b1
Merge pull request #1258 from little-dude/warnings
Fix compilation warnings
2018-05-22 09:43:31 -04:00
Kevin K
0d20694ce5
Merge pull request #1257 from little-dude/deprecate_from_usage
replace Arg::from_usage by Arg::from
2018-05-22 09:42:11 -04:00
Kevin K
d85f149949
Merge pull request #1256 from little-dude/string
convert Result<(), OsString> -> Result<(), String>
2018-05-22 09:31:16 -04:00
Guillaume Pinot
01d34fb8d2 update syn quote and proc_macro2 + fmt 2018-05-21 16:57:35 +02:00
windwardly
87daa0bc8e fix Cargo authors list insertion code (#111) 2018-05-17 09:54:56 +01:00
Guillaume Pinot
869c2dcb9e fix nightly 2018-04-28 21:07:50 +02:00
Guillaume Pinot
70fbd88ae7 Fix a bug when flattening an enum
Fix #103
2018-04-28 19:03:19 +02:00
Clément Renault
4111f9c6f8 Allow clap features to be activated independently (#100) 2018-04-23 08:50:20 +02:00
Corentin Henry
dcf00b76eb fix unused import warning 2018-04-21 13:06:11 -07:00
Corentin Henry
78cbb634a9 fix dead code warning 2018-04-21 12:17:48 -07:00
Corentin Henry
32fcd49fdf fix unused mut warnings 2018-04-21 12:14:49 -07:00
Corentin Henry
ff4ae462f5 fix unused variable warning 2018-04-21 12:14:05 -07:00
Corentin Henry
4f602b7e86 replace Arg::from_usage by Arg::from 2018-04-21 11:59:19 -07:00
Corentin Henry
e1f1a13e4d convert Result<(), OsString> -> Result<(), String>
fix https://github.com/kbknapp/clap-rs/issues/848
2018-04-21 11:24:59 -07:00
Brandon W Maister
ccb04a30cc Add StructOpt::from_iter_safe method (#98)
I would like to be able to test argument parsing, which requires an error
value, not a `process::exit()`.
2018-04-20 15:02:12 +02:00
Guillaume P
be8543813e Add an example using clap group. 2018-04-18 18:53:51 +02:00
Guillaume P
560df68ed2 v0.2.7 2018-04-12 11:41:05 +02:00
Georg Brandl
a91411742c Support flattening common options from a struct (#92)
Fix #21
2018-04-12 11:27:57 +02:00
Guillaume P
5cb7888988 subcommand aliases example 2018-04-09 11:14:28 +02:00
Clément Renault
d59117a9fc Disallow default_value and required for Option (#88) 2018-04-06 22:33:55 +02:00
Kevin K
9981bac22a
Merge pull request #1243 from durka/flexible-validator
imp: make Arg::validator more flexible (v3)
2018-04-04 22:13:11 -04:00
Alex Burka
c5d79d854e test validator with custom return type 2018-04-04 20:45:22 -04:00
Alex Burka
c3033ca75f imp: make Arg::validator more flexible
Makes the validator functions more flexible by changing the return
type from Result<(), String> to Result<O, E> where O is anything
and E is anything convertible to a String.

This allows, for example, using the same function for validating
and parsing your argument.

Breaking change (albeit tiny) due to function signature change.
2018-04-04 20:34:40 -04:00
Kevin K
0822e2eecf
Merge pull request #1211 from willmurphyscode/805-experiment
Implementation of custom help sections
2018-04-03 23:35:42 -04:00
Kevin K
8973f229b0
feat(Help): adds the ability for custom help sections
Args can now be added to custom help sections. This breaks up the builder pattern a little by adding help section declarations inline, but it's the most intuitive method and doesn't require strange nesting that feels awkward.

```rust
app::new("foo")
    .arg(Arg::with_name("arg1")) // under normal headers
    .help_heading("SPECIAL")
    .arg(Arg::with_name("arg2")) // under SPECIAL: heading
```

Closes #805
2018-04-03 23:32:59 -04:00
Kevin K
4df65d8c90
Merge pull request #1241 from kbknapp/v3-dev
V3 dev
2018-04-03 23:25:09 -04:00
Christian Legnitto
36815fec59 imp(macros): Support shorthand syntax for ArgGroups
Fixes https://github.com/kbknapp/clap-rs/issues/1231.
2018-04-03 23:03:21 -04:00
Kevin K
41e29417b5 fix: fixes hiding args from short or long help in v3 context
Fixes the implementation of the hiding of arguments form the short or long help on v3
2018-04-03 23:01:45 -04:00
Kevin K
82e8a47f24 api(Arg): adds abilit to hide an arg from the short or long help message
Add logic to filter based on hidden long/short.

There is still an issue with the logic in parser.rs use_long_help. This
causes invalid evaluation of whether to show/hide based on long or short help
Complete check for use_long_help, add tests
2018-04-03 20:00:36 -04:00
hcpl
5b883fcdaa Update syn, quote and proc-macro2 (#87)
* Remove `my_quote` and replace with plain `quote`
2018-04-01 23:24:42 +02:00