Commit graph

5923 commits

Author SHA1 Message Date
Ed Page
d188de0535 docs: Update changelog 2022-09-16 09:30:16 -05:00
Ed Page
48b2373569
Merge pull request #4221 from niyaznigmatullin/bump_terminal_size
chore(deps): bump `terminal_size` dependency to `0.2.1` and `textwrap` to `0.15.1`
2022-09-16 09:29:00 -05:00
Niyaz Nigmatullin
2fd55076e6 chore(deps): Bump terminal_size and textwrap 2022-09-16 15:47:34 +03:00
Ed Page
7de2f36e6b chore: Release 2022-09-12 17:02:47 -05:00
Ed Page
af47562311 docs: Roll back deprecation message
I got ahead of myself
2022-09-12 17:02:08 -05:00
Ed Page
1f053b9c9b
Merge pull request #4205 from epage/deprecations
docs: Expand on deprecation instructions
2022-09-12 16:34:36 -05:00
Ed Page
d1ff0632ad
Merge pull request #4204 from epage/map
feat(parser): TypedValueParseer::map for adapting value parsers
2022-09-12 16:23:05 -05:00
Ed Page
7272aa0950 docs: Expand on deprecation instructions 2022-09-12 16:16:36 -05:00
Ed Page
960c152b53 feat(parser): TypedValueParseer::map for adapting value parsers
This is a partial backport of #4095.  This was written to allow mapping
bools to other types but this will be useful for people using
`PossibleValue` with non-string types to upgrade to value parsers.
2022-09-12 15:40:58 -05:00
Ed Page
c361d01ad5 docs: Remove v4 from changelog 2022-09-07 11:35:39 -05:00
Ed Page
ddcd13b71b chore: Release 2022-09-01 20:22:50 -05:00
Ed Page
9d35abc22b docs: Update changelog 2022-09-01 20:22:33 -05:00
Ed Page
39aba08f88
Merge pull request #4171 from epage/helper2
feat(parser): Provide convenience accessors for Actions
2022-09-01 20:21:13 -05:00
Ed Page
2d5fea50b9 feat(parser): Provide convenience for SetTrue
I wanted to make `bool` a defaulted type parameter but
https://github.com/rust-lang/rust/issues/36887
2022-09-01 19:57:14 -05:00
Ed Page
d2a1f5a8f8 feat(parser): Provide convenience accessor for Counts 2022-09-01 19:57:10 -05:00
Ed Page
3c91438162 chore: Release 2022-08-30 21:40:05 -05:00
Ed Page
75f17b6215 docs: Update changelog 2022-08-30 21:39:57 -05:00
Ed Page
19c922260f
Merge pull request #4146 from Calder-Ty/bugfix/3861_backport
Backport Bugfix/3861 to V3: Mangen not showing possible values
2022-08-30 21:37:49 -05:00
Tyler Calder
f7af7659b8 fix: Add possible vals to man for positional args
Noticed that possible values would not show up for Positional arguments
as well. Decided to add the changes for those as well.
2022-08-30 19:37:47 -06:00
Ed Page
cf7f1fa583 chore: Release 2022-08-30 14:51:05 -05:00
Ed Page
754a949ee8 docs: Update changelog 2022-08-30 14:50:57 -05:00
Ed Page
4371a7b6cd
Merge pull request #4150 from epage/parent-usage
fix(usage): Don't include irrelevant parent args
2022-08-30 14:49:45 -05:00
Ed Page
ac5cd3795c fix(usage): Don't include irrelevant parent args
This was identified in https://github.com/clap-rs/clap/discussions/4134
2022-08-30 14:26:55 -05:00
Tyler Calder
9b4c276c01 fix: Use roff bullet lists for possible_values 2022-08-29 19:40:53 -06:00
Ed Page
19bc3b75f6 chore: Release 2022-08-29 11:27:59 -05:00
Ed Page
11f8ef8d10 docs: Update changelog 2022-08-29 11:27:37 -05:00
Ed Page
6987ae9145
Merge pull request #4139 from epage/help
fix(help): Command::print_help should respect disable_colored_help
2022-08-29 11:23:08 -05:00
Ed Page
a7d7602582 fix(help): Command::print_help should respect disable_colored_help 2022-08-29 11:01:24 -05:00
Tyler Calder
3d085b8507 fix: Take in account possible values being hidden
This makes sure we take into account the setting that possible args
is hidden

backporting to v3-master
2022-08-26 23:00:03 -06:00
Tyler Calder
17960a42f4 fix: Show possible values in generated man file
This adds feature parity for mangen with the standard help output. Users
will now see the list of possible values for value arguments.

One change that was made to make this possible was adding the method
`get_possible_values` to the public API for an arg. I tried to think of
a way to get around this, but because this is the interface that the
help generation uses, and it is part of the crate public interface
I thing adding it as a part of the public API might be for the best.

cherry-pick to backport this fix to v3

fixes: #3861
2022-08-26 22:54:02 -06:00
Ed Page
d3f0931267
Merge pull request #4124 from miguelff/v3-master
[Backport] Fix: Amend error message when deriving enums
2022-08-26 10:19:59 -05:00
Miguel Fernandez
dae2bb765f fix: Amend error message when deriving enums
Backported from v4. Original change: https://github.com/clap-rs/clap/pull/4118
2022-08-26 16:57:42 +02:00
Ed Page
88b941f87b
Merge pull request #4113 from epage/docs
docs: Fix for 1.63
2022-08-25 10:52:22 -05:00
Ed Page
4005dc40d7 docs: Fix for 1.63
This is a backport of e7ced880e
2022-08-25 10:41:50 -05:00
Ed Page
646a63674f
Merge pull request #4112 from jpgrayson/doc-override-usage-v3
docs: How to override multi-line usage
2022-08-25 10:38:50 -05:00
Peter Grayson
9620e12dd7
docs: How to override multi-line usage
Backport #4106 to v3-master branch.
2022-08-25 11:28:10 -04:00
Ed Page
df30c1a1a8 chore: Release 2022-08-12 08:28:06 -05:00
Ed Page
57161dbe92 docs: Update changelog 2022-08-12 08:26:41 -05:00
Ed Page
e29f0140a6
Merge pull request #4068 from danielparks/issue-3785-derive-id-attr-v3
v3 fix(derive): Add "id" attribute
2022-08-12 08:25:31 -05:00
Ed Page
bc84fc0f6e chore(ci): Lock docs to MSRV
This will help avoid issues with new warnings
2022-08-12 08:25:02 -05:00
Daniel Parks
d8e25498b2
fix(derive): Add "id" attribute
Backported from future version 4 (original commit
1a2ae76738)

> Previously the Arg id was set with the "name" attribute. This allows use
> of an "id" attribute to match the underlying struct.
>
> A side effect of this is that the "id" attribute may also be used on
> Commands. This isn't desired, but given the current architecture of the
> attribute parser, it's hard to avoid.
>
> Fixes: #3785
2022-08-11 21:49:41 -07:00
Ed Page
565c5ea5c0
Merge pull request #4048 from epage/backport
docs(tutorial): Switch to hand-implemented ValueEnum
2022-08-09 13:21:55 -05:00
Ed Page
3af94ec0af docs(tutorial): Switch to hand-implemented ValueEnum 2022-08-09 11:56:55 -05:00
Ed Page
3943ad7fc0 test(tutorial): Ensure we actually test code
Biggest problem identified is that we are incorrectly setting the help
usage in `04_04_custom`
2022-08-09 11:56:48 -05:00
Ed Page
a61f874a51
Merge pull request #4043 from epage/action
docs(derive): Clarify what defaulted action/value_parser does
2022-08-08 20:18:40 -05:00
Ed Page
c7123b3159 docs(derive): Clarify what defaulted action/value_parser does
Noticed this was missing when responding to #4041
2022-08-08 08:53:48 -05:00
Ed Page
f522b2c746
Merge pull request #4016 from epage/arg-enum
docs: Remove references to ArgEnum
2022-08-01 15:49:04 -05:00
Ed Page
1879ded6a9 docs: Remove references to ArgEnum
This is a partial backport of #4015

Fixes #4008
Fixes #4009
2022-08-01 15:42:31 -05:00
Ed Page
9bd1e2fd39 chore: Release 2022-07-29 20:52:02 -05:00
Ed Page
5e525944a5 docs: Update changelog 2022-07-29 20:51:50 -05:00