Commit graph

3082 commits

Author SHA1 Message Date
bors[bot]
c192f5effb
Merge #1709
1709: Tidy up the bug report template r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-29 16:08:01 +00:00
CreepySkeleton
3c321a75d0
Tidy up the bug report template 2020-02-29 12:24:15 +03:00
bors[bot]
4aaddf8375
Merge #1706
1706: Fix Clap::try_parse_from documentation r=pksunkara a=emilazy



Co-authored-by: Emily <vcs@emily.moe>
2020-02-27 12:48:46 +00:00
Emily
d36277b644
Fix Clap::try_parse_from documentation 2020-02-25 16:50:47 +00:00
bors[bot]
e4a7f50128
Merge #1669
1669: refactor: Rename Arg::conflicts_with_everything to Arg::exclusive (#1… r=pksunkara a=CreepySkeleton



Co-authored-by: Gregor Pfeifer <gpfeifer@dxc.com>
2020-02-22 21:58:29 +00:00
bors[bot]
7badb768bc
Merge #1703
1703: Changes to bors r=CreepySkeleton a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-22 19:46:06 +00:00
Pavan Kumar Sunkara
e93ea28971 Changes to bors 2020-02-22 19:39:13 +01:00
bors[bot]
28c46b5965
Merge #1697
1697: Allow replacing input on the fly r=CreepySkeleton a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-21 19:13:59 +00:00
Pavan Kumar Sunkara
b8851a7d5e Allow replacing input on the fly 2020-02-21 18:15:33 +01:00
bors[bot]
443cba97ee
Merge #1698
1698: Fix benchmarks r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-21 16:52:29 +00:00
CreepySkeleton
57ca48847a Run benches on stable 2020-02-21 18:21:57 +03:00
CreepySkeleton
edcb84b3c1 rustfmt 2020-02-21 18:21:32 +03:00
CreepySkeleton
8ca1c22981 Good names for CI + cleanup 2020-02-21 18:21:32 +03:00
CreepySkeleton
9d1cf49ca8 Move to criterion 2020-02-21 18:21:31 +03:00
bors[bot]
869ecb1188
Merge #1702
1702: Allow missing docs on arg_enum r=pksunkara a=cecton



Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
2020-02-21 12:22:49 +00:00
Cecile Tonglet
35b918bd72 Allow missing docs on arg_enum 2020-02-21 11:39:44 +01:00
bors[bot]
cc79c432a4
Merge #1701
1701: Remove unneeded file r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-21 09:51:56 +00:00
bors[bot]
a3b0f4825e
Merge #1700
1700: Fix warnings on nightly r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-21 00:30:34 +00:00
CreepySkeleton
4fcff089ef Remove unneeded file 2020-02-21 03:28:25 +03:00
CreepySkeleton
4f13f3155c Fix warnings on nightly 2020-02-21 01:55:19 +03:00
bors[bot]
bbb14f8bd4
Merge #1691
1691: Update issue templates r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-14 02:14:16 +00:00
CreepySkeleton
280382cb2f Pull request template and fix bors 2020-02-14 02:00:00 +03:00
CreepySkeleton
3bd3301e76
Update feature_request.md 2020-02-14 00:36:03 +03:00
CreepySkeleton
003047617c
Update bug_report.md 2020-02-14 00:16:57 +03:00
CreepySkeleton
b9917b02a7
Update feature_request.md 2020-02-14 00:15:45 +03:00
CreepySkeleton
9daa84c841
Update bug_report.md 2020-02-14 00:11:59 +03:00
CreepySkeleton
23bb900dca Update issue templates 2020-02-13 23:43:23 +03:00
bors[bot]
6910a93ee7
Merge #1690
1690: Improve error messages a bit  r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-13 20:36:36 +00: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
bors[bot]
956b4119f5
Merge #1688
1688: Implement derive traits for Box<T> r=pksunkara a=CreepySkeleton

Closes #1674 

Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-13 15:44:50 +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]
1e7c9efc9d
Merge #1612
1612: Use about() with help() and long_about() with long_help() r=pksunkara a=TheLostLambda

I was going through the clap documentation and was under the impression that calling `help()` would call `about()` and `long_help()` would call `long_about()`, but I've actually discovered this not to be the case. Instead, the `long_about()` was always shown when it existed, rendering the output (in the about section) of programs called with `-h` and `--help` identical. Issue #1472 shows this and that is fixed here.

Note this doesn't remove the ability to use the same about in both cases: if `long_about()` is unset, then `about()` is used in both cases.

I've changed the implementation here to use `is_some()` and `unwrap()` as opposed to `if let` because it ultimately allows for less repetitive code. Ideally, I'd be able to pair `if let` with a secondary condition (namely `self.use_long`), but to my dismay, let-chains are not stabilized yet.

For a second opinion, here is the code a settled on:
```
if self.use_long && parser.meta.long_about.is_some() {
    debugln!("Help::write_default_help: writing long about");
    write_thing!(parser.meta.long_about.unwrap())
} else if parser.meta.about.is_some() {
    debugln!("Help::write_default_help: writing about");
    write_thing!(parser.meta.about.unwrap())
}
```
Here is the alternative:
```
if self.use_long {
    if let Some(about) = parser.meta.long_about {
        debugln!("Help::write_default_help: writing long about");
        write_thing!(about)
    } else if let Some(about) = parser.meta.about {
        debugln!("Help::write_default_help: writing about");
        write_thing!(about)
   }
} else {
    if let Some(about) = parser.meta.about {
        debugln!("Help::write_default_help: writing about");
        write_thing!(about)
    }
}
```

Co-authored-by: Brooks J Rady <b.j.rady@gmail.com>
2020-02-13 07:21:05 +00:00
Brooks J Rady
9cde072b61 Use about() with help() and long_about() with long_help() 2020-02-13 00:31:45 +00: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
bors[bot]
20cdc8384f
Merge #1685
1685: Add "work in progress" disclaimer to readme r=pksunkara a=CreepySkeleton

Closes #1684

Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-10 22:46:22 +00:00
bors[bot]
53f72be8d0
Merge #1686
1686: Use 'Clap Maintainers' as authors r=CreepySkeleton a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-10 22:20:27 +00:00
CreepySkeleton
11f04e229a
Update README.md 2020-02-10 22:16:34 +03:00
Pavan Kumar Sunkara
970d7140a3 Use 'Clap Maintainers' as authors 2020-02-10 20:16:25 +01:00
bors[bot]
0660e81231
Merge #1683
1683: Added HelpRequired AppSetting r=pksunkara a=thomasfermi

Closes #1683 

There are likely some problems with my solution to this issue. I would be thankful for a review!

Co-authored-by: thomasfermi <mario.theers@gmail.com>
2020-02-10 17:47:40 +00:00
thomasfermi
f7b63c7be6 Implemented minor review findings. 2020-02-10 17:57:32 +01:00
thomasfermi
aa97a4e8aa Added test for HelpRequired setting, which checks subcommands. Fixed bug that was discovered. 2020-02-10 14:33:26 +01:00
CreepySkeleton
a45b116795
Add "work in progress" disclaimer to readme
Closes #1684
2020-02-10 14:47:11 +03:00
thomasfermi
2059bf1035 Implemented review findings for pull request #1683 2020-02-10 11:04:18 +01:00
thomasfermi
91f37f9358 Deleted unnecessary code in doc comments. 2020-02-09 21:37:19 +01:00
thomasfermi
48eb6a4530 Added HelpRequired AppSetting 2020-02-09 21:05:01 +01:00
bors[bot]
ae2e00f418
Merge #1680
1680: Cut merge commit's messages to the title of the PR r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-08 16:18:01 +00:00