Commit graph

5941 commits

Author SHA1 Message Date
Emerson Ford
e39156e0b9 feat: Add method to get non-visible arg aliases 2022-07-12 11:23:22 -07:00
Ed Page
9b6321a1f0 chore: Release 2022-07-11 21:48:07 -05:00
Ed Page
074712a739 chore: Update release process 2022-07-11 21:47:35 -05:00
Ed Page
096db791bf docs: Update changelog 2022-07-11 21:46:05 -05:00
Ed Page
3802a35a43
Merge pull request #3909 from emersonford/fix-mut-subcommand-lifetime
fix: loosen lifetime constraint on mut_subcommand
2022-07-11 21:45:01 -05:00
Emerson Ford
8e1411b3b2 fix: Loosen lifetime constraint on mut_subcommand 2022-07-11 19:12:36 -07:00
Ed Page
5c7ad01587
Merge pull request #3908 from jturner314-nrl/derive-ref-quotes
docs(derive): Clarify `rename_all` takes a string literal
2022-07-11 19:12:03 -05:00
James D. Turner
f94eafbaf7 Clarify in docs that rename_all needs a string literal 2022-07-11 17:59:02 -04:00
James D. Turner
93565c226c Add "" around string literals in derive ref docs
When deriving `ValueEnum` (and possibly in other cases as well), the
attribute is silently ignored if the user leaves off these quotes.
2022-07-11 17:13:06 -04:00
Ed Page
7c0068e5b9
Merge pull request #3906 from epage/complete
docs(complete): Make example consistent
2022-07-11 15:36:39 -05:00
Ed Page
6286339f81 docs(complete): Make example consistent
Fixes #3883
2022-07-11 15:20:45 -05:00
Daniel Saxton
c4612e4c17
docs: Fix typo in derive API README (#3896)
Co-authored-by: Daniel Saxton <dsaxton@pm.me>
2022-07-05 09:49:55 -05:00
Ed Page
9c81b39533
Merge pull request #3893 from iwanders/add-comment-about-derive-feature
Add comment about requiring the derive feature.
2022-07-05 09:11:49 -05:00
Ivor Wanders
ee6dc53722 docs: Reorder dependency addition and example 2022-07-03 09:49:52 -04:00
Ed Page
4ecdd1afe8
Merge pull request #3890 from clap-rs/dependabot/github_actions/pre-commit/action-3.0.0
chore(deps): bump pre-commit/action from 2.0.3 to 3.0.0
2022-07-01 20:41:11 -05:00
Ed Page
f495827126 chore: Release 2022-07-01 19:48:03 -05:00
Ed Page
51ad0dd155 docs: Update changelog 2022-07-01 19:47:49 -05:00
Ed Page
2b417c8593
Merge pull request #3884 from grant0417/clap-complete-fig-use-actions
feat(clap_complete_fig): Switch to using `ArgAction`
2022-07-01 19:46:00 -05:00
grant0417
85b1b7711a fix: Add back depercated is_multiple_occurrences_set 2022-07-01 11:48:56 -07:00
dependabot[bot]
5ba845ab6f
chore(deps): bump pre-commit/action from 2.0.3 to 3.0.0
Bumps [pre-commit/action](https://github.com/pre-commit/action) from 2.0.3 to 3.0.0.
- [Release notes](https://github.com/pre-commit/action/releases)
- [Commits](https://github.com/pre-commit/action/compare/v2.0.3...v3.0.0)

---
updated-dependencies:
- dependency-name: pre-commit/action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 03:05:59 +00:00
Ed Page
64918b516f
Merge pull request #3886 from epage/docs
doc: Explain why examples are missing
2022-06-30 11:32:57 -05:00
Ed Page
7009ae63c8 doc: Explain why examples are missing
Fixes #3865
2022-06-30 08:29:16 -05:00
Ed Page
6614ffa6c8 chore: Release 2022-06-30 08:25:54 -05:00
Ed Page
a67746ecbe docs: Update changelog 2022-06-30 08:25:46 -05:00
Ed Page
5ca73f3299
Merge pull request #3882 from emersonford/mut_subcommands
feat: add `mut_subcommand` method to modify existing subcommands
2022-06-30 08:24:43 -05:00
Emerson Ford
619f209138 feat: Add mut_subcommand method to Command
this allows us modify existing subcommands on an existing/already built
Command struct
2022-06-29 20:42:58 -07:00
grant0417
4cf9f392ae fix: Run cargo fmt 2022-06-28 18:38:43 -07:00
grant0417
0025944d9e feat(clap_complete_fig): Switch to using ArgAction 2022-06-28 18:30:39 -07:00
Ed Page
b4a1362486 chore: Release 2022-06-28 08:04:18 -05:00
Ed Page
3e80393e43 docs: Update changelog 2022-06-28 08:03:17 -05:00
Ed Page
f406d99b95
Merge pull request #3879 from epage/env
fix(parser): Ensure globals override env vars
2022-06-28 08:01:21 -05:00
Ed Page
72d206e4d9 fix(parser): Ensure globals override env vars
This fixes a bug introduced in 4a694f3592
when we were trying to move away from presence checks via occurrences.
I switched it to the common type of presence check but really what we
want is a highest-precedence check.

Fixes #3872
2022-06-27 22:40:40 -05:00
Ed Page
f082eb6d4a test(parser): Verify global/default interaction 2022-06-27 22:32:13 -05:00
Ed Page
9962393c20
Merge pull request #3877 from epage/assert
test: Verify auto-traits for core types
2022-06-27 21:05:44 -05:00
Ed Page
3c4e684c8b test: Verify auto-traits for core types
By checking these types, we'll get some other types for free, like
`Command` verifying `Arg`.

This was inspired by #3876
2022-06-27 20:50:29 -05:00
Ed Page
a05f4d34a3
Merge pull request #3870 from stepancheg/macro-refs
Put once_cell reexport into __macro_refs
2022-06-27 20:44:01 -05:00
Ed Page
5ba41d775c docs(license): Update years/holders
Without copyright assignment, everyone owns their own copyright, so
tried to reflect that.

See #3875
2022-06-27 12:55:09 -05:00
Stiopa Koltsov
464ef3920b refactor: Put once_cell reexport into __macro_refs
When upgrading our company projects from clap 3.1 to clap 3.2 I had
to fix several references to `clap::lazy_init`. People are not
supposed to do that, but that's hard to enforce.

Hope placing `once_cell` reexport into `__macro_refs` prevent at
least some of the such issues in the future.
2022-06-26 04:13:03 +01:00
Ed Page
08d12b6db4
Merge pull request #3866 from hw-lunemann/derive-ref-spelling-fix
Fix spelling of 'APIs' in the derive docs
2022-06-25 19:16:33 -05:00
hw-lunemann
7e785ad9d6 Fix spelling of APIs 2022-06-25 00:55:48 +02:00
Ed Page
b2779f2249
Merge pull request #3862 from epage/deprecate
fix(docs): Update deprecations to latest target
2022-06-22 15:18:04 -05:00
Ed Page
f9e51952b8 fix(docs): Update deprecations to latest target
Before, I was mixed on doing this as ideally people would upgrade
through the minor releases, going through the release notes.  This also
saves us havin to audit deprecations to make sure they are all pointing
to the latest.

First, this isn't practical for users.  Its annoying to pin your version (at least
its easier now that we pin `clap_derive` for users) and a lot of work to
go through them one step at a time.

On top of that, we've changed our deprecation policy to put the timing
of responding to deprecations into the user's hands with, with us
putting them behind the `deprecated` feature flag.  This means someone
might respond to deprecations every once in a while or might not do it
until right before the 4.0 release.  Our deprecation messages should be
updated to respond to that.

This supersedes #3616
2022-06-22 14:31:15 -05:00
Ed Page
3823df9bbe chore: Release 2022-06-21 09:32:04 -05:00
Ed Page
8a659bc2b4 docs: Update changelog 2022-06-21 09:31:11 -05:00
Ed Page
ceb7ee4f54
Merge pull request #3860 from epage/panic
fix(parser): Don't panic on `--=`
2022-06-21 09:30:19 -05:00
Ed Page
01da890145 fix(parser): Don't panic on --=
This broke when we introduced clap_lex and then did a refactor on top.
We put in guards to say that escapes shouldn't happen but missed `--=`
which isn't quite an escape.

Not fully set on what error should be returned in this case (we are
returning roughly what we used to) but at least
we aren't panicing.

Fixes #3858
2022-06-21 08:53:04 -05:00
Ed Page
dabb5713d4
Merge pull request #3853 from dtolnay-contrib/valuevalidation
Fix typo in ErrorKind::ValueValidation message
2022-06-17 15:39:37 -05:00
David Tolnay
690530a191
Fix typo in ErrorKind::ValueValidation message 2022-06-17 13:07:09 -07:00
Ed Page
ae78f88d48
Merge pull request #3852 from epage/msrv
chore: Bump MSRV from 1.56.0 to 1.56.1
2022-06-17 09:23:06 -05:00
Ed Page
82d70d82c4 chore: Bump MSRV from 1.56.0 to 1.56.1
Being a patch release, I'm fine doing this outside of a minor release.
This avoids us having to deal with indexmap having a higher MSRV.
2022-06-17 09:01:45 -05:00