Commit graph

110 commits

Author SHA1 Message Date
Pavan Kumar Sunkara
b562ce4d63 Some modifications to allow cargo verification to work 2020-05-03 11:48:01 +02:00
bors[bot]
99e862945e
Merge #1883
1883: External subcommand r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-05-01 17:59:32 +00:00
CreepySkeleton
a21372e9ed Fix ui tests 2020-05-01 20:09:55 +03:00
CreepySkeleton
6bdb6d9b2e Marry AllowExternalSubcommands with SubcommandRequiredElse* 2020-05-01 15:33:36 +03:00
CreepySkeleton
ec6b6e1e36 Make validator take &str instead of String 2020-05-01 14:21:11 +03:00
CreepySkeleton
ee463ba834 Make extrernal_subcommand ALMOST work 2020-04-30 20:20:21 +03:00
CreepySkeleton
3b418fe1a1 Cleaning 2020-04-30 15:11:39 +03:00
Pavan Kumar Sunkara
68ce9dd6ec Rename trybuild file to ui 2020-04-28 11:39:30 +02:00
Pavan Kumar Sunkara
7616a5fa2e Implemented arg_enum for option and vec 2020-04-28 11:35:47 +02:00
creativcoder
d0abb378b0 cargo fmt 2020-04-27 20:41:41 +05:30
creativcoder
9c8c06dd8c Fix test for about method resolution in clap_derive 2020-04-27 02:42:07 +05:30
creativcoder
92d5920748 Updated test and usage of older help APIs with about 2020-04-27 02:42:07 +05:30
CreepySkeleton
2e959d6c71 Update tests 2020-04-24 11:15:55 +03:00
Pavan Kumar Sunkara
ea637b22eb Apply suggestions from code review
Co-Authored-By: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-04-22 18:28:56 +02:00
Pavan Kumar Sunkara
dbe6ac01f6 Clean up arg_enum 2020-04-22 14:38:16 +02:00
Pavan Kumar Sunkara
c4c6c35da7 Added alias support for arg_enum 2020-04-22 14:38:09 +02:00
Pavan Kumar Sunkara
01c179f527 Added arg_enum support 2020-04-22 14:37:45 +02:00
Pavan Kumar Sunkara
c1ab22c3c9 Remove unneeded paths 2020-04-22 09:33:39 +02:00
Pavan Kumar Sunkara
070bd50b28 Finished color refactor 2020-04-16 12:51:26 +02:00
Pavan Kumar Sunkara
b45746feff Remove some defaults from profiles 2020-04-10 17:19:26 +02:00
Pavan Kumar Sunkara
cceb29623a Remove nightly feature 2020-04-10 10:42:25 +02:00
Pavan Kumar Sunkara
f0a216036b Fix some issues 2020-04-09 19:41:33 +02:00
CreepySkeleton
b61a807728 Fix clippy and bump MSRV 2020-03-13 22:41:40 +03:00
CreepySkeleton
1cff11109e Fix CI 2020-03-13 20:51:41 +03:00
CreepySkeleton
5d9ef1527f Fix warnings in tests & examples 2020-03-05 13:40:25 +03:00
CreepySkeleton
bfc850e99a Suppress warnings in generated code 2020-03-05 11:35:21 +03:00
CreepySkeleton
d466a56aa1 Fix benches 2020-03-04 21:31:18 +03:00
Pavan Kumar Sunkara
d8d29aea13 Remove every proc_macro_derive except Clap 2020-03-02 16:28:35 +01:00
Pavan Kumar Sunkara
0c22a9df6c Added support for unit-struct 2020-03-02 11:46:40 +01:00
CreepySkeleton
3f314ce39e Use full span information whenever possible 2020-02-13 21:47:42 +03:00
CreepySkeleton
9a15e47af0 Fix dummy implementations 2020-02-13 21:46:33 +03:00
bors[bot]
a2dfbec2bc
Merge #1689
1689: Remove some mentioning of structopt r=TeXitoi a=CreepySkeleton

A work on #1671. Attention! It doesn't close it just yet

Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-13 17:37:28 +00:00
CreepySkeleton
28ef1e91d4
Remove some mentioning of structopt 2020-02-13 18:29:51 +03:00
CreepySkeleton
43acfa00f4
Implement derive traits for Box<T> 2020-02-13 18:21:01 +03:00
bors[bot]
12df8cb078
Merge #1681
1681: WIP: Extract subcommands into separate trait r=pksunkara a=CreepySkeleton

Not-yet-working-but-almost-there "multiple traits" approach. More or less done, what's left is to catch some bugs and adapt tests/examples.

For the record: it took so long because of RL stuff (who would have thought?) and because [there was a detailed description of the experience I've had here, but it was deleted because it contained a lot of profanity and emotional notes]. 

As the only person alive that understands how the derive works (if you won't blow your own horn, nobody will do it for you, yeah), I'd like to made a statement: we Do need the refactoring.

Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-12 20:42:32 +00:00
CreepySkeleton
ae574df2f9
Extract subcommands into separate trait 2020-02-12 23:15:05 +03:00
Pavan Kumar Sunkara
970d7140a3 Use 'Clap Maintainers' as authors 2020-02-10 20:16:25 +01:00
bors[bot]
ad5606b5a0
Merge #1678
1678: Refactor clap_generate r=CreepySkeleton a=pksunkara

I have copied the code from [clap_generate]( https://github.com/clap-rs/clap_generate) and refactored the structure a bit.

This new structure will allow people to write their own generators using our `Generator` trait which will contain some helpers (Still working on polishing them).

Co-authored-by: Ole Martin Ruud <barskern@outlook.com>
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-08 15:00:50 +00:00
Pavan Kumar Sunkara
33f47acc67 Refactor clap_generate 2020-02-07 07:52:04 +01:00
Pavan Kumar Sunkara
5b3a0dff9c Remove extern & macro_use where possible 2020-02-07 07:34:01 +01:00
CreepySkeleton
8221c4f367 Get rid of #[clap(no_version)] 2020-02-05 16:54:58 +03:00
bors[bot]
509ac33a20
Merge #1664
1664: Import structopt r=pksunkara a=CreepySkeleton

OK, here is about 50% of what's left to import.

`impl StructOpt for Box<impl StructOpt>` is not imported because layouts of `StructOpt` and `Clap` are too different. I'll work it out after the import is done.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/clap-rs/clap/1664)
<!-- Reviewable:end -->


Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
Co-authored-by: David McNeil <mcneil.david2@gmail.com>
2020-02-05 08:43:57 +00:00
CreepySkeleton
0b8f274078 Fix tests 2020-02-05 10:13:39 +03:00
CreepySkeleton
1b2c4344cb Fix visibility errors 2020-02-05 09:41:51 +03:00
David McNeil
62c4266daf Fix verbatim_doc_comment on fields
Signed-off-by: David McNeil <mcneil.david2@gmail.com>
2020-02-05 09:35:21 +03:00
CreepySkeleton
c40eb88d5b Less another one 2020-02-05 09:35:01 +03:00
CreepySkeleton
c7c7e5113c One less hack 2020-02-05 09:34:23 +03:00
Cecile Tonglet
8f3eb4623e Implemented: flatten on enums
Fixes #327
2020-02-05 09:10:59 +03:00
CreepySkeleton
596bdec856 Bugfix #324
Fixes https://github.com/TeXitoi/structopt/issues/324
2020-02-04 17:07:39 +03:00
CreepySkeleton
cf11d46373 Default value for default_value (yeah, sounds awkward) 2020-02-04 11:40:01 +03:00
Pavan Kumar Sunkara
4d2c8ffa6b Update Cargo.toml files 2020-02-04 09:11:33 +01:00
CreepySkeleton
5aafe9eaaf Pre release tweaks and changelog 2020-02-04 11:10:47 +03:00
CreepySkeleton
3b11f9af25 Consistent doc comments (#296) 2020-02-03 18:20:08 +03:00
CreepySkeleton
0851fb0266 Introduce #[structopt(rename_all_env)] 2020-02-03 17:56:17 +03:00
Pavan Kumar Sunkara
dd75cee72c fix: Clippy should pass 2020-02-01 06:48:50 +01:00
Pavan Kumar Sunkara
8e4a189ab0 fmt: Use standardized rustfmt rules 2020-01-31 18:37:56 +01:00
lzutao
dbc7988d23
Bump rustversion to stable release v1 2020-01-31 14:58:00 +07:00
Pavan Kumar Sunkara
afa9ec5e32 Address review comments
Co-Authored-By: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-01-19 06:08:22 +05:30
Pavan Kumar Sunkara
7e0d820aa6 Run clap_derive tests in CI 2020-01-18 19:04:11 +05:30
Pavan Kumar Sunkara
5e8f424dfe Merged clap_derive using git-subtree 2020-01-18 17:40:07 +05:30