Commit graph

4380 commits

Author SHA1 Message Date
Ed Page
88fff13e71 Revert rename of from_yaml / from_usage
Since usage parser and yaml are on the way to being deprecated (#8, #9),
doing a rename also seems excessive, so rolling it back.

Past relevant PRs:
- clap-rs/clap#1157
- clap-rs/clap#1257
2021-11-22 16:17:46 -06:00
Ed Page
20101a5785
Merge pull request #19 from epage/benches
test: Get benches passing
2021-11-22 16:15:55 -06:00
Ed Page
4c7d29f464 test: Get benches passing 2021-11-22 16:09:39 -06:00
Marcin Puc
b95ced6fb3 Fix docs for Arg aliases (clap-rs/clap#3044) 2021-11-22 08:58:39 -06:00
Ed Page
700efb170a
Merge pull request #17 from epage/revert
Revert "Deprecate Arg::help in favour of Arg::about"
2021-11-18 12:42:01 -06:00
Ed Page
7e899cd340 Revert "Deprecate Arg::help in favour of Arg::about"
This reverts commits 24cb8b1..d0abb37 from clap-rs/clap#1840

This is part of #16.  clap-rs/clap#1840 wasn't the right call but we
don't have time to make the decision now, so instead of having one
option and changing it in 4.0, this reverts back to clap2 behavior.
2021-11-18 12:25:49 -06:00
Ed Page
154a88dafd
Merge pull request #18 from epage/check
chore(ci): Remove smoke build
2021-11-18 12:12:18 -06:00
Ed Page
b7d9787c5e chore(ci): Remove smoke build
When CI is ridiculously long, this helps cut it off early.  In our case,
this ends up being a large percentage of our CI time.
2021-11-18 12:00:24 -06:00
Ed Page
daf76bcd63 refactor(ci): Offer more flexibility 2021-11-18 11:52:09 -06:00
Ed Page
cd3837dccb
Merge pull request #13 from epage/examples
Fix problems found when testing examples
2021-11-17 21:19:29 -06:00
Ed Page
2d41f7409e
Merge pull request #12 from epage/doctest
test: Compile example in README
2021-11-17 21:11:48 -06:00
Ed Page
ff476660ce test: Compile example in README 2021-11-17 21:01:56 -06:00
Ed Page
11537b24a5
Merge pull request #7 from epage/revert
revert: Default value behaviour with conflicts and requirement validation
2021-11-17 15:56:27 -06:00
Ed Page
ede8af1da9
Merge pull request #5 from epage/dependabot/cargo/os_str_bytes-5.0
chore(deps): Update os_str_bytes requirement from 4.1 to 5.0
2021-11-17 15:46:13 -06:00
Ed Page
9753f68a76 revert: Default value behaviour with conflicts and requirement validation
This feature is too immature at this stage in the release.   See
clap-rs/clap Issue 3020 when bringing this feature back.

This reverts commit 301c6f765a.
This reverts commit 43a4c90c86.
This reverts commit 4e29777b21.
This reverts commit 69957c4ddd.
This reverts commit bdb1d324a5.
This reverts commit b102da0cd2.
This reverts commit 72429be14e.
This reverts commit 0b7def675b.
This reverts commit b86aa631be.
This reverts commit 6b458c602d.
2021-11-17 15:45:50 -06:00
Ed Page
6f70f65a24
Merge pull request #3 from epage/change
docs: Parent SubcommandPrecedenceOverArg under AppSettings
2021-11-17 15:45:33 -06:00
Ed Page
42f13977c3
Merge pull request #6 from epage/generic
feat(derive): Generic support
2021-11-17 15:45:19 -06:00
Ed Page
fa0b5477b7
Merge pull request #4 from epage/dependabot/cargo/pretty_assertions-1.0
chore(deps): Update pretty_assertions requirement from 0.7 to 1.0
2021-11-17 15:45:04 -06:00
dependabot[bot]
7737ce6946
chore(deps): Update os_str_bytes requirement from 4.1 to 5.0
Updates the requirements on [os_str_bytes](https://github.com/dylni/os_str_bytes) to permit the latest version.
- [Release notes](https://github.com/dylni/os_str_bytes/releases)
- [Commits](https://github.com/dylni/os_str_bytes/compare/4.1.0...5.0.0)

---
updated-dependencies:
- dependency-name: os_str_bytes
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-17 21:34:23 +00:00
dependabot[bot]
33240fcff3
chore(deps): Update pretty_assertions requirement from 0.7 to 1.0
Updates the requirements on [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) to permit the latest version.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v0.7.0...v1.0.0)

---
updated-dependencies:
- dependency-name: pretty_assertions
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-17 21:34:15 +00:00
kuviman
aa6594b334 feat(derive): Generic support
This is a port of clap-rs/clap#3023
2021-11-17 15:33:59 -06:00
Ed Page
58b0fe537e
Merge pull request #2 from epage/boiler
chore: Align on boilerplate
2021-11-17 15:32:41 -06:00
Ed Page
4e546dd2a1 chore: Align on boilerplate 2021-11-17 15:24:50 -06:00
Ed Page
bbe32b2667 docs(examples): De-duplicate subcommand examples
Not seeing what this example adds over the other ones.  We've already
shown subcommands and shown that `App` has extra behavior for when
definint subcommands.
2021-11-17 15:23:31 -06:00
Ed Page
2ac2fc6005 docs(examples): Be explicit in multicall for what clap does
This better matches our other examples
2021-11-17 15:23:31 -06:00
Ed Page
3be8bcf756 docs(examples): Move unwrap comments to expect statements
This better models what users should be doing and makes it so all
comments are more clear.  In a prior commit, when a changed an `exit` to
`unwrap`, I disliked the fact that I was mixing an unwrap explanatory
comment in with another comment.  This makes them stand apart.
2021-11-17 15:23:31 -06:00
Ed Page
41d3b8f164 docs(examples): Remove unnecessary error check
Rather not confuse the point for users.
2021-11-17 15:23:31 -06:00
Ed Page
221c18bdec fix(error): Ensure value_of_t errors have trailing newline
Noticed this with `12_typed_values.rs`
2021-11-17 15:23:31 -06:00
Ed Page
7763a7c52a docs(examples): Focus subcommands on main call
The subcommand examples focus on the various ways of looking up
subcommands except for the main one people should be using.   This has
previously caused confusion, see https://github.com/clap-rs/clap/discussions/3000

To keep the examples focused, I only show `ArgMatches::subcommand`.  I
figure the examples are not exhaustive and that for the cases when
someone wants to do something more specialized, they can pull up the
API reference.
2021-11-17 15:23:31 -06:00
Ed Page
93948cc724 docs(examples): Work around non-commutative conflicts
The comments in these examples say that a `conflicts_with` should
override `required`.  This seems to be true one way but not the other,
causing these examples to error out at runtime.
2021-11-17 15:23:31 -06:00
Ed Page
4eba65bfaf docs(examples): Don't use is_present with subcommands
Apparently, this isn't supported anymore.
2021-11-17 15:23:31 -06:00
Ed Page
1f0d86a407 docs(examples): Highlight possible-values in help
Instead of showing the user how to do things manually, let's make the
contrast in `--help` more obvious by not manually listing the possible
values.
2021-11-17 15:23:31 -06:00
Ed Page
6fc9c7cff4 docs(examples): Be consistent in define and read order
This threw me off because the arguments are so similar, I kept relying
on the order but they were swapped.
2021-11-17 15:23:31 -06:00
Ed Page
cdc5026410 docs(examples): Use correct arg keys 2021-11-17 15:23:31 -06:00
Ed Page
7c24e937f8 docs(examples): Provide visual indication of user choice 2021-11-17 15:23:31 -06:00
Ed Page
74d41b6f52 docs(examples): Don't crash when subcommand isn't provided 2021-11-17 15:23:31 -06:00
Ed Page
0a4a2dd36b docs(examples): Provide app_from_crate! example
This consolidates two `crate_*!` macro examples into a `app_from_crate`
example.

- This is more of what we expect users to use
- We've talked about splitting the `crate_*` macros out into their own
  crate.  This shifts the focus to what clap would be providing long
  term
2021-11-17 15:23:31 -06:00
Ed Page
535d663dfc docs(examples): Align quick_examples
`01b` doesn't require `output`, so updating `01a` to match
2021-11-17 15:23:31 -06:00
Ed Page
2df043655f docs(examples): Remove reference to non-existent example 2021-11-17 15:23:31 -06:00
Ed Page
dd974168fd docs: Fix typos 2021-11-17 15:21:58 -06:00
Ed Page
60aac4760a
Merge pull request #1 from epage/ci
Speed up CI
2021-11-17 15:10:35 -06:00
Ed Page
b06f69b08d chore(ci): Reduce scope 2021-11-17 15:01:16 -06:00
Ed Page
2113b044e7 chore: Remove dead files 2021-11-17 14:58:56 -06:00
Ed Page
3c937dc76a fix: Allow tests without cargo feature 2021-11-17 14:27:26 -06:00
Ed Page
4479282b11 style: Address warnings 2021-11-17 14:23:32 -06:00
Ed Page
89e1c7206b chore: Remove dead code 2021-11-17 13:56:36 -06:00
Ed Page
0168dd7350 chore: Remove site 2021-11-17 13:49:59 -06:00
Ed Page
26cefe2ce3 chore(ci): Update for branch renames
And for not running bors
2021-11-17 13:49:29 -06:00
Ed Page
23b988e064 docs: Parent SubcommandPrecedenceOverArg under AppSettings
We have it marked as an `ArgSettings` when it is an `AppSettings`.
2021-11-15 10:27:30 -06:00
bors[bot]
5e913473d7
Merge #3025
3025: docs: Remove references to `just` (removed by #2923) r=epage a=mkayaalp



Co-authored-by: mkayaalp <mk@mkayaalp.net>
2021-11-15 14:52:00 +00:00