Commit graph

3239 commits

Author SHA1 Message Date
William Yao
12e88e1ea8 note about optional subcommands 2017-07-17 11:45:31 +02:00
William Yao
a8e466c7bb add documentation in structopt-derive about how to use subcommands 2017-07-17 11:45:31 +02:00
William Yao
f68a35c3a1 preliminary editing of structopt-derive documentation 2017-07-17 11:45:31 +02:00
William Yao
f9fc923993 add link to structopt-derive documentation from structopt crate 2017-07-17 11:45:31 +02:00
William Yao
a20a9e7be0 fix hyphenated subcommands 2017-07-17 11:45:31 +02:00
William Yao
b295234d5d add test suite for nested subcommands (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
William Yao
91e2d28e81 allow for optional subcommands (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
William Yao
baa96165f1 ignore unused matches for empty subcommands (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
William Yao
c010cf0266 add ability to put in nested subcommands (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
William Yao
e00e263f23 add test for subcommand parsing (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
William Yao
00c659b9c6 lifetime fix 2017-07-17 11:45:31 +02:00
William Yao
30a3b3145c prototype enum stuff? 2017-07-17 11:45:31 +02:00
William Yao
fd67b01466 factor out code generation that's needed for enums 2017-07-17 11:45:31 +02:00
William Yao
08aeb9b1fb skeleton of enum impl 2017-07-17 11:45:31 +02:00
William Yao
00f313b5d1 split impl_structopt into struct and enum branches 2017-07-17 11:45:31 +02:00
William Yao
a4826404f3 separate creating app and adding arguments 2017-07-17 11:45:31 +02:00
Kevin K
e27a6ffbde chore: increase version
* chore: disables mention-bots finding reviewers and pinging tons of people

* docs(README.md): added a warning about using ~ deps

* chore: increase version
2017-06-19 22:57:54 -04:00
Guillaume Pinot
859ac77f4e Update to 0.0.5 (oups...) 2017-06-16 17:12:21 +02:00
Kevin K
d02e24a970 Merge pull request #980 from little-dude/flag
Suggest to use flag after a sub-command
2017-06-16 10:28:41 -04:00
Kevin K
2b144cf165 Merge pull request #985 from little-dude/clippy
Some clippy fixes
2017-06-16 10:24:01 -04:00
Guillaume Pinot
51e0c36278 update to 0.0.4 2017-06-16 13:40:59 +02:00
Pascal Hertleif
483396dc97 Remove unneeded lifetime annotation 2017-06-16 12:31:37 +02:00
Pascal Hertleif
2075ee8328 Favor help argument over doc comments
This changes the behavior of `from_attr_or_env` (used for clap
application settings) to favor the last occurrence of the requested
attribute. This is what repeatedly calling the same methods to set field
properties does implicitly.
2017-06-16 12:31:37 +02:00
Pascal Hertleif
c66413a082 WIP: Allow doc comment to set help text
This treats doc comments as `help`/`about` attributes, which may lead to
concatenating the original help text with the doc comment.
2017-06-16 12:31:37 +02:00
Corentin Henry
e8518cf07d tests(Suggestions): update tests for subcommand suggestions 2017-06-12 08:03:39 -07: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
Corentin Henry
9d5482ebf6 clippy: block_in_if_condition_stmt 2017-06-12 07:56:22 -07:00
Corentin Henry
35306ed9f1 clippy: single_match 2017-06-12 07:56:22 -07:00
Corentin Henry
cda5cfd1a8 clippy: explicit_iter_loop 2017-06-12 07:56:22 -07:00
Corentin Henry
2859af0e52 clippy: block_in_if_condition_stmt 2017-06-12 07:56:22 -07:00
Corentin Henry
2121c6b908 clippy: ignore too_many_arguments 2017-06-12 07:56:22 -07:00
Corentin Henry
f54b9dce74 clippy: ignore useless_let_if_seq 2017-06-12 07:56:22 -07:00
Corentin Henry
97394164c7 clippy: useless_let_if_seq 2017-06-12 07:56:22 -07:00
Corentin Henry
6e96447c50 clippy: or_fun_call 2017-06-12 07:56:22 -07:00
Corentin Henry
23e2f2b07b remove vec_remove!
it is used only once in the whole codebase and is only three lines long
2017-06-12 07:56:22 -07:00
Corentin Henry
80900a388c clippy: op_ref in vec_remove! 2017-06-12 07:56:22 -07:00
Corentin Henry
bc2103c643 clippy: op_ref for _find_by_long! 2017-06-12 07:56:22 -07:00
Corentin Henry
26f8ce01b9 clippy: op_ref in find_by_name! 2017-06-12 07:56:22 -07:00
Corentin Henry
adb253e63d clippy: op_ref 2017-06-12 07:56:22 -07:00
Corentin Henry
1deff7a44a clippy: identity_op 2017-06-12 07:56:19 -07:00
Corentin Henry
8578f56568 clippy: if_same_then_else 2017-06-12 07:53:55 -07:00
Corentin Henry
f86edf48b1 clippy: needless_borrow 2017-06-12 07:53:55 -07:00
Corentin Henry
dfcefea6fa clippy: collapsible_if 2017-06-12 07:53:55 -07:00
Corentin Henry
852e9ceb18 clippy: let_and_return 2017-06-12 07:53:55 -07:00
Corentin Henry
2f0e511ab6 clippy doc_markdown 2017-06-12 07:53:55 -07:00
Corentin Henry
be6ce71d33 fix unused_macros warnings for non-yaml build 2017-06-12 07:53:55 -07:00
Corentin Henry
e29590527a fix dead_code warning 2017-06-12 07:53:55 -07:00
Corentin Henry
548bf64e4a remove unused macros 2017-06-12 07:53:55 -07:00
Vanessa McHale
a6c6e81529 typo fixed 2017-06-10 17:43:09 -04:00
Vanessa McHale
0da5820e3b fixes bug with unicode widths 2017-06-10 17:43:09 -04:00