Commit graph

4664 commits

Author SHA1 Message Date
Ed Page
05cf230ac1
Merge pull request #3170 from epage/default
fix(derive): Treat `default_value_os` like `default_value`
2021-12-13 16:37:26 -06:00
Ed Page
7c10b5a9b4 fix(derive): Treat default_value_os like default_value
The test went from panicing to not-panicing

Fixes #3031
2021-12-13 16:25:49 -06:00
Pavan Kumar Sunkara
8eb55381ca
Merge pull request #3169 from epage/help
fix(help): Don't commit to '--help' that doesn't work
2021-12-13 22:15:58 +00:00
Ed Page
19ed78c64f fix(help): Don't commit to '--help' that doesn't work
We have two ways of fixing this
- Making `--help` work
- Don't put `--help` in the help output

For now, I went with the latter.  I tried to make it clear what the
actual requirement is so we can pivot if needed.

Fixes #2892

This happens to also fix the interaction of `DisableHelpFlag` with the
help subcommand and complcations.  I've added a test to help catch if we
break this by changing how we fixed the original issue.

Fixes #2724

These issues were reported against clap3.  I've not tried to reproduce
these in clap2 to see if they should show up in the release notes.
2021-12-13 15:59:14 -06:00
Ed Page
fa439d4f27
Merge pull request #3168 from epage/error
Ensure trailing newlines at the end of errors
2021-12-13 14:15:22 -06:00
Ed Page
a72e5726f8 fix(error): Ensure newline on value_of_t not found
Found this when auditing for cases related to #2787.
2021-12-13 13:30:32 -06:00
Ed Page
4c8caa6eb3 test(error): Add explicit value_of_t test case
This adds an explicit test case for
221c18bdec when before we covered it via
the example tests.
2021-12-13 13:30:28 -06:00
Ed Page
2eb69def4e fix(error): Ensure trailing newline without help
Fixes #2787
2021-12-13 13:09:48 -06:00
Pavan Kumar Sunkara
6b6f01006d
Merge pull request #3167 from epage/exhaustived
fix!: Allow adding new enum variants
2021-12-13 18:34:35 +00:00
Ed Page
98a1c2e6c9 fix!: Allow adding new enum variants
Without being a breaking change.

This seems minor enough that we can break this during the release
candidates.  For `ValueHint`, the completion scripts are 99% of who
should be `match`ing it.  `AppSettings` as undocumented variants that
people shouldn't use.

BREAKING CHANGE: `clap::{ValueHint, ErrorKind, AppSettings,
ArgSettings}` are now `non_exhaustive`.
2021-12-13 12:11:00 -06:00
Ed Page
be223df828 fix(ci): Correct release lints
I'm assuming we won't have a negative performance impact by removing
`impl Copy for Id` because the compiler would inline the `clone()`s and
turn them into copies.

Addresses problems from #3164
2021-12-13 09:41:22 -06:00
Pavan Kumar Sunkara
ac751c2721
Merge pull request #3164 from epage/lint
chore(ci): Lint release builds
2021-12-13 15:39:16 +00:00
Ed Page
da0fe8f325 chore(ci): Lint release builds 2021-12-13 09:28:42 -06:00
Ed Page
b55ffdd0ce
Merge pull request #3154 from rhysd/fix-unused-warning
Fix unused parameter warning
2021-12-13 09:27:29 -06:00
Ed Page
b0f1750e81
Merge pull request #3041 from fishface60/master
Rewrite Multicall handling to just strip path off argv0
2021-12-13 09:21:59 -06:00
Ed Page
0b9aa487f6
Merge pull request #3163 from epage/docs
docs: List out each API
2021-12-13 09:07:30 -06:00
Ed Page
81f3bd794a docs: List out each API
This builds on #3149
2021-12-13 08:56:56 -06:00
Ed Page
7695ea2ce0
Merge pull request #3162 from PatrickNicholas/master
examples: Fix typo
2021-12-13 08:49:26 -06:00
p4tr1ck
f3afcee855 examples: Fix typo 2021-12-13 22:34:08 +08:00
Ed Page
2132b1f52a
Merge pull request #3158 from epage/docs
Expand clap_generate's documentation
2021-12-13 08:21:35 -06:00
Pavan Kumar Sunkara
36313b779f
Merge pull request #3161 from DerZade/master
docs: Fix copy paste error in example
2021-12-13 12:10:51 +00:00
DerZade
7c60180e24 docs: Fix copy paste error in example 2021-12-13 11:41:12 +01:00
Richard Maw
38b9645bed fix: Windows Multicall support
The executable suffix is unconditionally stripped off the file path
so that the file name matches subcommands names
without having to add the EXE suffix on different platforms.
2021-12-12 22:08:25 +00:00
Richard Maw
17c64ef42b fix: Example typo 2021-12-12 22:08:25 +00:00
Richard Maw
e3d355fa85 feat: Make Multicall just strip dir from argv0 2021-12-12 22:08:25 +00:00
Ed Page
87d4400f1a docs(readme): Expand generate's readme
Modeled it after clap's README.

The lib.rs is written in a way that cause the example to be merged in.
2021-12-11 19:01:50 -06:00
Ed Page
b5cc5f0c5b docs(readme): Fix name of clap_generate 2021-12-11 18:59:28 -06:00
Ed Page
e647b643cf docs(contrib): Generate-specific notes 2021-12-11 18:55:50 -06:00
Ed Page
378e8d733d
Merge pull request #3150 from japert/improve-subcommand-deprecation-message
Improve `SubCommand` deprecation message.
2021-12-11 17:42:03 -06:00
Janis Peukert
1f51e8cb2f docs: Clarify deprecation message for SubCommand
Only `SubCommand` is deprecated, not `Subcommand`.
This new deprecation message mentions this ambiguity.

Resolves #3147.
2021-12-11 14:47:08 -08:00
rhysd
b498876cd8 fix: Fix unused parameter warning 2021-12-12 00:44:14 +09:00
Ed Page
f7af296a8c docs(readme): Link out to clap-generate 2021-12-11 09:12:59 -06:00
Ed Page
8bb71415af docs(readme): Consistently use crates.io links 2021-12-11 09:12:26 -06:00
Ed Page
fe1e1a6a86
Merge pull request #3149 from vi/patch-1
docs: Fix numbers of list entries in FAQ.md
2021-12-11 09:06:06 -06:00
Pavan Kumar Sunkara
bbc9db198f
Merge pull request #3157 from isudzumi/patch-1
docs: Fix pacman-like interface example link
2021-12-11 14:23:33 +00:00
Hiroaki ITO
c2dc425784
docs: Fix the pacman-like interface example link 2021-12-11 22:22:09 +09:00
Pavan Kumar Sunkara
534bb27762
Merge pull request #3153 from rhysd/id-in-assertions
feat: Include argument ID in UTF-8 assertion messages
2021-12-11 13:08:56 +00:00
rhysd
8ce56d416e fix: Update tests for assertion messages 2021-12-11 20:33:23 +09:00
rhysd
bc12ef168a feat: Include argument ID in UTF-8 assertion messages
so that users can understand which argument was going wrong.
2021-12-11 15:35:51 +09:00
Vitaly Shukela
f9d926550a
docs: Fix numbers of list entries in FAQ.md 2021-12-11 02:34:49 +03:00
Ed Page
c3f8c8938f chore: Release 2021-12-10 15:25:23 -06:00
Ed Page
74349cfcaa
Merge pull request #3144 from epage/test
fix(derive): Allow aliased Option with ArgEnum
2021-12-10 11:06:53 -06:00
Ed Page
703238f155 test(derive): Check all derives
There will always be some kind of corner case not covered as code
evolves but this expands the test to all of the basics.
2021-12-10 10:52:30 -06:00
Ed Page
43d3ac37a6 fix(derive): Allow aliased Option with ArgEnum 2021-12-10 10:41:55 -06:00
Ed Page
71a564de88 test(derive): Don't parse the actual command line 2021-12-10 10:36:45 -06:00
Pavan Kumar Sunkara
0eda43d0f6
Merge pull request #3142 from spire-ffoston/fix-result-type-alias-derive-impl
Fix unqualified result types causing compilation failures with derive implementations
2021-12-10 16:26:16 +00:00
Ed Page
cfbea9b12f docs: Note argfile's existence
Fixes #1693
2021-12-10 10:03:39 -06:00
Frankie Foston
1285c0f885 fix: unqualified result types causing compilation failures with derive implementations 2021-12-10 14:13:26 +00:00
Ed Page
ada95d6f3d chore: Release 2021-12-09 19:39:08 -06:00
Ed Page
4ab51976a3 chore: Release 2021-12-09 19:38:37 -06:00