Repository: clap-rs/clap (rust)

Issue:
[docs] No mention how to skip enum variants on the `ValueEnum` derive macro
### Please complete the following tasks

- [X] I have searched the [discussions](https://github.com/clap-rs/clap/discussions)
- [X] I have searched the [open](https://github.com/clap-rs/clap/issues) and [rejected](https://github.com/clap-rs/clap/issues?q=is%3Aissue+label%3AS-wont-fix+is%3Aclosed) issues

### Clap Version

4.0.7

### Describe your use case

I was looking for a way to skip a variant from an enum, when using the `ValueEnum` derive macro. Turns out there actually IS a way, but it's not mentioned anywhere in the reference in a direct way.

Simple example:
```rust
#[derive(Debug, ValueEnum)]
struct Format {
    Text,
    Json,
    #[value(skip)]
    None, // handled by another flag manually
}
```

The `hide` attribute is mentioned (somewhat), as one can check the available functions on the `PossibleValue` struct, but it's not the same as it only hides it in the docs. Only with `#[value(skip)]` it's fully omitted and becomes an impossible value to create through the CLI.

The `skip` attribute is only mentioned in a few places in the derive reference:
- In the command attributes, as part of the `Subcommand` specific attributes: https://docs.rs/clap/4.0.7/clap/_derive/index.html#command-attributes
- In the arg group attributes: https://docs.rs/clap/4.0.7/clap/_derive/index.html#arggroup-attributes
- In the arg attributes, but only for typical fields and saying that it uses `Default::default()` or the given expression, so it doesn't look applicable for enums: https://docs.rs/clap/4.0.7/clap/_derive/index.html#arggroup-attributes
- The overview talks about skipping of non-unit enum variants, but doesn't tell how: https://docs.rs/clap/4.0.7/clap/_derive/index.html#overview

### Describe the solution you'd like

There is already a `ValueEnum` section for attributes in the docs: https://docs.rs/clap/4.0.7/clap/_derive/index.html#valueenum-attributes

This one only needs an additional entry for the `skip` attribute, describing that it can be used to omit variants from the generated implementation.

### Alternatives, if applicable

_No response_

### Additional Context

_No response_

Pull request:
docs: Describe the skip attribute for ValueEnums
<!--
Thanks for helping out!

Please link the appropriate issue from your PR.

If you don't have an issue, we'd recommend starting with one first so the PR can focus on the
implementation (unless its an obvious bug or documentation fix that will have
little conversation).
-->
Documenting the `skip` attribute for the `ValueEnum` derive macro promptly, as it's not mentioned anywhere else.

Fixes #4327


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c4f7621..b52bb687 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 <!-- next-header -->
 ## [Unreleased] - ReleaseDate
 
+## [4.0.9] - 2022-10-03
+
+### Fixes
+
+- *(derive)* Process doc comments for `#[command(subcommand)]` like in clap v3
+
+## [4.0.8] - 2022-10-01
+
+### Fixes
+
+- *(derive)* Remove a low-value assert preventing defaulting `Help` and `Version` actions
+
 ## [4.0.7] - 2022-09-30
 
 ### Features
@@ -23,7 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 
 ### Features
 
-- *(derive)* Support `#[group(skip)] (#4279, #4301)
+- *(derive)* Support `#[group(skip)]` (#4279, #4301)
 
 ## [4.0.5] - 2022-09-30
 
@@ -3899,7 +3911,9 @@ Minimum version of Rust is now v1.13.0 (Stable)
 * **arg**  allow lifetimes other than 'static in arguments ([9e8c1fb9](https://github.com/clap-rs/clap/commit/9e8c1fb9406f8448873ca58bab07fe905f1551e5))
 
 <!-- next-url -->
-[Unreleased]: https://github.com/clap-rs/clap/compare/v4.0.7...HEAD
+[Unreleased]: https://github.com/clap-rs/clap/compare/v4.0.9...HEAD
+[4.0.9]: https://github.com/clap-rs/clap/compare/v4.0.8...v4.0.9
+[4.0.8]: https://github.com/clap-rs/clap/compare/v4.0.7...v4.0.8
 [4.0.7]: https://github.com/clap-rs/clap/compare/v4.0.6...v4.0.7
 [4.0.6]: https://github.com/clap-rs/clap/compare/v4.0.5...v4.0.6
 [4.0.5]: https://github.com/clap-rs/clap/compare/v4.0.4...v4.0.5
diff --git a/Cargo.lock b/Cargo.lock
index fd88c403..aea84823 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -17,6 +17,12 @@ version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
 
+[[package]]
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
 [[package]]
 name = "atty"
 version = "0.2.14"
@@ -55,18 +61,6 @@ version = "1.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
 
-[[package]]
-name = "bstr"
-version = "0.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
-dependencies = [
- "lazy_static",
- "memchr",
- "regex-automata",
- "serde",
-]
-
 [[package]]
 name = "bumpalo"
 version = "3.11.0"
@@ -97,26 +91,54 @@ version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
+[[package]]
+name = "ciborium"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f"
+dependencies = [
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b"
+dependencies = [
+ "ciborium-io",
+ "half",
+]
+
 [[package]]
 name = "clap"
-version = "2.34.0"
+version = "3.2.22"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
+checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750"
 dependencies = [
  "bitflags",
+ "clap_lex 0.2.4",
+ "indexmap",
  "textwrap",
- "unicode-width",
 ]
 
 [[package]]
 name = "clap"
-version = "4.0.7"
+version = "4.0.9"
 dependencies = [
  "atty",
  "backtrace",
  "bitflags",
  "clap_derive",
- "clap_lex",
+ "clap_lex 0.3.0",
  "humantime",
  "once_cell",
  "rustversion",
@@ -137,7 +159,7 @@ dependencies = [
 name = "clap_bench"
 version = "0.0.0"
 dependencies = [
- "clap 4.0.7",
+ "clap 4.0.9",
  "criterion",
  "lazy_static",
 ]
@@ -146,8 +168,8 @@ dependencies = [
 name = "clap_complete"
 version = "4.0.2"
 dependencies = [
- "clap 4.0.7",
- "clap_lex",
+ "clap 4.0.9",
+ "clap_lex 0.3.0",
  "is_executable",
  "os_str_bytes",
  "pathdiff",
@@ -161,14 +183,14 @@ dependencies = [
 name = "clap_complete_fig"
 version = "4.0.0"
 dependencies = [
- "clap 4.0.7",
+ "clap 4.0.9",
  "clap_complete",
  "snapbox",
 ]
 
 [[package]]
 name = "clap_derive"
-version = "4.0.7"
+version = "4.0.9"
 dependencies = [
  "heck",
  "proc-macro-error",
@@ -177,6 +199,15 @@ dependencies = [
  "syn",
 ]
 
+[[package]]
+name = "clap_lex"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+dependencies = [
+ "os_str_bytes",
+]
+
 [[package]]
 name = "clap_lex"
 version = "0.3.0"
@@ -188,7 +219,7 @@ dependencies = [
 name = "clap_mangen"
 version = "0.2.2"
 dependencies = [
- "clap 4.0.7",
+ "clap 4.0.9",
  "roff",
  "snapbox",
 ]
@@ -222,15 +253,16 @@ checksum = "d6417fe6fc03a8b533fd2177742eeb39a90c7233eedec7bac96d4d6b69a09449"
 
 [[package]]
 name = "criterion"
-version = "0.3.6"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f"
+checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb"
 dependencies = [
+ "anes",
  "atty",
  "cast",
- "clap 2.34.0",
+ "ciborium",
+ "clap 3.2.22",
  "criterion-plot",
- "csv",
  "itertools",
  "lazy_static",
  "num-traits",
@@ -239,7 +271,6 @@ dependencies = [
  "rayon",
  "regex",
  "serde",
- "serde_cbor",
  "serde_derive",
  "serde_json",
  "tinytemplate",
@@ -248,9 +279,9 @@ dependencies = [
 
 [[package]]
 name = "criterion-plot"
-version = "0.4.5"
+version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
 dependencies = [
  "cast",
  "itertools",
@@ -293,34 +324,11 @@ dependencies = [
 
 [[package]]
 name = "crossbeam-utils"
-version = "0.8.11"
+version = "0.8.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc"
+checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac"
 dependencies = [
  "cfg-if",
- "once_cell",
-]
-
-[[package]]
-name = "csv"
-version = "1.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1"
-dependencies = [
- "bstr",
- "csv-core",
- "itoa 0.4.8",
- "ryu",
- "serde",
-]
-
-[[package]]
-name = "csv-core"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
-dependencies = [
- "memchr",
 ]
 
 [[package]]
@@ -444,19 +452,13 @@ dependencies = [
 
 [[package]]
 name = "itertools"
-version = "0.10.3"
+version = "0.10.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
 dependencies = [
  "either",
 ]
 
-[[package]]
-name = "itoa"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
-
 [[package]]
 name = "itoa"
 version = "1.0.3"
@@ -465,9 +467,9 @@ checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"
 
 [[package]]
 name = "js-sys"
-version = "0.3.59"
+version = "0.3.60"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2"
+checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
 dependencies = [
  "wasm-bindgen",
 ]
@@ -480,9 +482,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
 
 [[package]]
 name = "libc"
-version = "0.2.132"
+version = "0.2.134"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"
+checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb"
 
 [[package]]
 name = "linux-raw-sys"
@@ -559,9 +561,9 @@ dependencies = [
 
 [[package]]
 name = "once_cell"
-version = "1.13.1"
+version = "1.15.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"
+checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
 
 [[package]]
 name = "oorandom"
@@ -593,9 +595,9 @@ checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd"
 
 [[package]]
 name = "plotters"
-version = "0.3.3"
+version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "716b4eeb6c4a1d3ecc956f75b43ec2e8e8ba80026413e70a3f41fd3313d3492b"
+checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97"
 dependencies = [
  "num-traits",
  "plotters-backend",
@@ -645,9 +647,9 @@ dependencies = [
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.43"
+version = "1.0.46"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"
+checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b"
 dependencies = [
  "unicode-ident",
 ]
@@ -694,12 +696,6 @@ dependencies = [
  "regex-syntax",
 ]
 
-[[package]]
-name = "regex-automata"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
-
 [[package]]
 name = "regex-syntax"
 version = "0.6.27"
@@ -761,28 +757,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
 
 [[package]]
 name = "serde"
-version = "1.0.144"
+version = "1.0.145"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860"
+checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
 dependencies = [
  "serde_derive",
 ]
 
-[[package]]
-name = "serde_cbor"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
-dependencies = [
- "half",
- "serde",
-]
-
 [[package]]
 name = "serde_derive"
-version = "1.0.144"
+version = "1.0.145"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00"
+checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -795,7 +781,7 @@ version = "1.0.85"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
 dependencies = [
- "itoa 1.0.3",
+ "itoa",
  "ryu",
  "serde",
 ]
@@ -814,9 +800,9 @@ checksum = "62ac7f900db32bf3fd12e0117dd3dc4da74bc52ebaac97f39668446d89694803"
 
 [[package]]
 name = "snapbox"
-version = "0.3.3"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44d199ccf8f606592df2d145db26f2aa45344e23c64b074cc5a4047f1d99b0f7"
+checksum = "f98a96656eecd1621c5830831b48eb6903a9f86aaeb61b9f358a9bd462414ddd"
 dependencies = [
  "concolor",
  "normalize-line-endings",
@@ -847,9 +833,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
 
 [[package]]
 name = "syn"
-version = "1.0.99"
+version = "1.0.101"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"
+checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -877,12 +863,9 @@ dependencies = [
 
 [[package]]
 name = "textwrap"
-version = "0.11.0"
+version = "0.15.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
-dependencies = [
- "unicode-width",
-]
+checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16"
 
 [[package]]
 name = "tinytemplate"
@@ -917,9 +900,9 @@ dependencies = [
 
 [[package]]
 name = "trybuild"
-version = "1.0.64"
+version = "1.0.65"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7f408301c7480f9e6294eb779cfc907f54bd901a9660ef24d7f233ed5376485"
+checksum = "9e13556ba7dba80b3c76d1331989a341290c77efcf688eca6c307ee3066383dd"
 dependencies = [
  "glob",
  "once_cell",
@@ -932,9 +915,9 @@ dependencies = [
 
 [[package]]
 name = "trycmd"
-version = "0.13.6"
+version = "0.13.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ac9fa73959e252e7c5a4e6260544b952f5bf3989e0b7ad229f4fd6f14671b02"
+checksum = "a5377b33cbe8bb69d97da63e2a2266065a642a47cc9bb3d783c28279d0029fea"
 dependencies = [
  "escargot",
  "glob",
@@ -999,9 +982,9 @@ dependencies = [
 
 [[package]]
 name = "unicode-ident"
-version = "1.0.3"
+version = "1.0.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
+checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
 
 [[package]]
 name = "unicode-width"
@@ -1043,9 +1026,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen"
-version = "0.2.82"
+version = "0.2.83"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d"
+checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
 dependencies = [
  "cfg-if",
  "wasm-bindgen-macro",
@@ -1053,9 +1036,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-backend"
-version = "0.2.82"
+version = "0.2.83"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f"
+checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
 dependencies = [
  "bumpalo",
  "log",
@@ -1068,9 +1051,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-macro"
-version = "0.2.82"
+version = "0.2.83"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602"
+checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
 dependencies = [
  "quote",
  "wasm-bindgen-macro-support",
@@ -1078,9 +1061,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-macro-support"
-version = "0.2.82"
+version = "0.2.83"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da"
+checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1091,15 +1074,15 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-shared"
-version = "0.2.82"
+version = "0.2.83"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a"
+checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
 
 [[package]]
 name = "web-sys"
-version = "0.3.59"
+version = "0.3.60"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1"
+checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"
 dependencies = [
  "js-sys",
  "wasm-bindgen",
diff --git a/Cargo.toml b/Cargo.toml
index 26695af1..979a5590 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,7 @@ members = [
 
 [package]
 name = "clap"
-version = "4.0.7"
+version = "4.0.9"
 description = "A simple to use, efficient, and full-featured Command Line Argument Parser"
 repository = "https://github.com/clap-rs/clap"
 categories = ["command-line-interface"]
@@ -62,7 +62,7 @@ default = [
   "error-context",
   "suggestions",
 ]
-debug = ["clap_derive/debug", "dep:backtrace"] # Enables debug messages
+debug = ["clap_derive?/debug", "dep:backtrace"] # Enables debug messages
 unstable-doc = ["derive", "cargo", "wrap_help", "env", "unicode", "string", "unstable-replace", "unstable-grouped"] # for docs.rs
 
 # Used in default
@@ -75,7 +75,7 @@ suggestions = ["dep:strsim", "error-context"]
 
 # Optional
 deprecated = ["clap_derive?/deprecated"] # Guided experience to prepare for next breaking release (at different stages of development, this may become default)
-derive = ["clap_derive", "dep:once_cell"]
+derive = ["dep:clap_derive", "dep:once_cell"]
 cargo = ["dep:once_cell"] # Disable if you're not using Cargo, enables Cargo-env-var-dependent macros
 wrap_help = ["help", "dep:terminal_size"]
 env = [] # Use environment variables during arg parsing
@@ -91,7 +91,7 @@ unstable-v5 = ["clap_derive?/unstable-v5", "deprecated"]
 bench = false
 
 [dependencies]
-clap_derive = { path = "./clap_derive", version = "=4.0.7", optional = true }
+clap_derive = { path = "./clap_derive", version = "=4.0.9", optional = true }
 clap_lex = { path = "./clap_lex", version = "0.3.0" }
 bitflags = "1.2"
 unicase = { version = "2.6", optional = true }
@@ -104,12 +104,12 @@ unicode-width = { version = "0.1.9", optional = true }
 once_cell = { version = "1.12.0", optional = true }
 
 [dev-dependencies]
-trybuild = "1.0.18"
+trybuild = "1.0.65"
 rustversion = "1"
 # Cutting out `filesystem` feature
 trycmd = { version = "0.13", default-features = false, features = ["color-auto", "diff", "examples"] }
 humantime = "2"
-snapbox = "0.3"
+snapbox = "0.4"
 shlex = "1.1.0"
 static_assertions = "1.1.0"
 unic-emoji-char = "0.9.0"
diff --git a/clap_bench/Cargo.toml b/clap_bench/Cargo.toml
index ce158b2f..b9441e37 100644
--- a/clap_bench/Cargo.toml
+++ b/clap_bench/Cargo.toml
@@ -12,7 +12,7 @@ release = false
 
 [dev-dependencies]
 clap = { path = "../", version = "4.0.0-alpha.0", default-features = false, features = ["std", "help"] }
-criterion = "0.3.2"
+criterion = "0.4.0"
 lazy_static = "1"
 
 [[bench]]
diff --git a/clap_complete/Cargo.toml b/clap_complete/Cargo.toml
index a3d6a353..6b6d1fca 100644
--- a/clap_complete/Cargo.toml
+++ b/clap_complete/Cargo.toml
@@ -49,7 +49,7 @@ shlex = { version = "1.1.0", optional = true }
 unicode-xid = { version = "0.2.2", optional = true }
 
 [dev-dependencies]
-snapbox = { version = "0.3", features = ["diff"] }
+snapbox = { version = "0.4", features = ["diff"] }
 # Cutting out `filesystem` feature
 trycmd = { version = "0.13", default-features = false, features = ["color-auto", "diff", "examples"] }
 clap = { path = "../", version = "4.0.0-alpha.0", default-features = false, features = ["std", "derive", "help"] }
diff --git a/clap_complete_fig/Cargo.toml b/clap_complete_fig/Cargo.toml
index 028e13ce..0cef5d43 100644
--- a/clap_complete_fig/Cargo.toml
+++ b/clap_complete_fig/Cargo.toml
@@ -43,5 +43,5 @@ clap = { path = "../", version = "4.0.0-alpha.0", default-features = false, feat
 clap_complete = { path = "../clap_complete", version = "4.0.0-alpha.0" }
 
 [dev-dependencies]
-snapbox = { version = "0.3", features = ["diff"] }
+snapbox = { version = "0.4", features = ["diff"] }
 clap = { path = "../", version = "4.0.0-alpha.0", default-features = false, features = ["std", "help"] }
diff --git a/clap_derive/Cargo.toml b/clap_derive/Cargo.toml
index 221b4c0e..0ef3ed0e 100644
--- a/clap_derive/Cargo.toml
+++ b/clap_derive/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "clap_derive"
-version = "4.0.7"
+version = "4.0.9"
 description = "Parse command line argument by defining a struct, derive crate."
 repository = "https://github.com/clap-rs/clap/tree/master/clap_derive"
 categories = ["command-line-interface", "development-tools::procedural-macro-helpers"]
@@ -31,9 +31,6 @@ targets = ["x86_64-unknown-linux-gnu"]
 shared-version = true
 dependent-version = "upgrade"
 tag-name = "v{{version}}"
-pre-release-replacements = [
-  {file="README.md", search="github.com/clap-rs/clap/blob/[^/]+/", replace="github.com/clap-rs/clap/blob/{{tag_name}}/", exactly=2, prerelease = true},
-]
 
 [lib]
 proc-macro = true
diff --git a/clap_derive/src/item.rs b/clap_derive/src/item.rs
index 8b60b1f8..68af9d62 100644
--- a/clap_derive/src/item.rs
+++ b/clap_derive/src/item.rs
@@ -143,7 +143,7 @@ impl Item {
         let parsed_attrs = ClapAttr::parse_all(&variant.attrs);
         res.infer_kind(&parsed_attrs);
         res.push_attrs(&parsed_attrs);
-        if matches!(&*res.kind, Kind::Command(_)) {
+        if matches!(&*res.kind, Kind::Command(_) | Kind::Subcommand(_)) {
             res.push_doc_comment(&variant.attrs, "about", true);
         }
 
@@ -155,6 +155,9 @@ impl Item {
                         "methods are not allowed for flattened entry"
                     );
                 }
+
+                // ignore doc comments
+                res.doc_comment = vec![];
             }
 
             Kind::Subcommand(_)
@@ -228,6 +231,9 @@ impl Item {
                         "methods are not allowed for flattened entry"
                     );
                 }
+
+                // ignore doc comments
+                res.doc_comment = vec![];
             }
 
             Kind::Subcommand(_) => {
diff --git a/clap_mangen/Cargo.toml b/clap_mangen/Cargo.toml
index 54434765..245f1ae4 100644
--- a/clap_mangen/Cargo.toml
+++ b/clap_mangen/Cargo.toml
@@ -44,7 +44,7 @@ roff = "0.2.1"
 clap = { path = "../", version = "4.0.0-alpha.0", default-features = false, features = ["std", "env"] }
 
 [dev-dependencies]
-snapbox = { version = "0.3", features = ["diff"] }
+snapbox = { version = "0.4", features = ["diff"] }
 clap = { path = "../", version = "4.0.0-alpha.0", default-features = false, features = ["std", "help"] }
 
 [features]
diff --git a/examples/README.md b/examples/README.md
index 5c5841bc..f98c370c 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -11,6 +11,6 @@ This directory contains the source for the above.
 ## Contributing
 
 New examples should fit within the above structure and support their narrative
-- Add the example to [Cargo.tom](../Cargo.toml) for any `required-features`
+- Add the example to [Cargo.toml](../Cargo.toml) for any `required-features`
 - Document how the example works with a `.md` file which will be verified using [trycmd](https://docs.rs/trycmd)
 - Pull the `.rs` and `.md` file into the appropriate module doc comment to be accessible on docs.rs
diff --git a/examples/tutorial_builder/04_01_enum.md b/examples/tutorial_builder/04_01_enum.md
index ef67bc80..858f2f38 100644
--- a/examples/tutorial_builder/04_01_enum.md
+++ b/examples/tutorial_builder/04_01_enum.md
@@ -4,11 +4,31 @@ A simple to use, efficient, and full-featured Command Line Argument Parser
 
 Usage: 04_01_enum[EXE] <MODE>
 
+Arguments:
+  <MODE>
+          What mode to run the program in
+
+          Possible values:
+          - fast: Run swiftly
+          - slow: Crawl slowly but steadily
+
+Options:
+  -h, --help
+          Print help information (use `-h` for a summary)
+
+  -V, --version
+          Print version information
+
+$ 04_01_enum -h
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+Usage: 04_01_enum[EXE] <MODE>
+
 Arguments:
   <MODE>  What mode to run the program in [possible values: fast, slow]
 
 Options:
-  -h, --help     Print help information
+  -h, --help     Print help information (use `--help` for more detail)
   -V, --version  Print version information
 
 $ 04_01_enum fast
diff --git a/examples/tutorial_builder/04_01_enum.rs b/examples/tutorial_builder/04_01_enum.rs
index 3f8ddd3a..a8b0e685 100644
--- a/examples/tutorial_builder/04_01_enum.rs
+++ b/examples/tutorial_builder/04_01_enum.rs
@@ -14,8 +14,8 @@ impl ValueEnum for Mode {
 
     fn to_possible_value<'a>(&self) -> Option<PossibleValue> {
         Some(match self {
-            Mode::Fast => PossibleValue::new("fast"),
-            Mode::Slow => PossibleValue::new("slow"),
+            Mode::Fast => PossibleValue::new("fast").help("Run swiftly"),
+            Mode::Slow => PossibleValue::new("slow").help("Crawl slowly but steadily"),
         })
     }
 }
diff --git a/examples/tutorial_derive/04_01_enum.md b/examples/tutorial_derive/04_01_enum.md
index f6f39779..18db5e0d 100644
--- a/examples/tutorial_derive/04_01_enum.md
+++ b/examples/tutorial_derive/04_01_enum.md
@@ -4,11 +4,31 @@ A simple to use, efficient, and full-featured Command Line Argument Parser
 
 Usage: 04_01_enum_derive[EXE] <MODE>
 
+Arguments:
+  <MODE>
+          What mode to run the program in
+
+          Possible values:
+          - fast: Run swiftly
+          - slow: Crawl slowly but steadily
+
+Options:
+  -h, --help
+          Print help information (use `-h` for a summary)
+
+  -V, --version
+          Print version information
+
+$ 04_01_enum_derive -h
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+Usage: 04_01_enum_derive[EXE] <MODE>
+
 Arguments:
   <MODE>  What mode to run the program in [possible values: fast, slow]
 
 Options:
-  -h, --help     Print help information
+  -h, --help     Print help information (use `--help` for more detail)
   -V, --version  Print version information
 
 $ 04_01_enum_derive fast
diff --git a/examples/tutorial_derive/04_01_enum.rs b/examples/tutorial_derive/04_01_enum.rs
index 078fc5d1..41410a3b 100644
--- a/examples/tutorial_derive/04_01_enum.rs
+++ b/examples/tutorial_derive/04_01_enum.rs
@@ -10,7 +10,11 @@ struct Cli {
 
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
 enum Mode {
+    /// Run swiftly
     Fast,
+    /// Crawl slowly but steadily
+    ///
+    /// This paragraph is ignored because there is no long help text for possible values.
     Slow,
 }
 
diff --git a/src/_derive/mod.rs b/src/_derive/mod.rs
index 653f076c..42f17824 100644
--- a/src/_derive/mod.rs
+++ b/src/_derive/mod.rs
@@ -258,6 +258,7 @@
 //!   - When not present: case-converted field name is used
 //! - `help = <expr>`: [`PossibleValue::help`][crate::builder::PossibleValue::help]
 //!   - When not present: [Doc comment summary](#doc-comments)
+//! - `skip`: Ignore this variant
 //!
 //! ## Arg Types
 //!
diff --git a/src/builder/arg_group.rs b/src/builder/arg_group.rs
index 459cc7f5..a6386a1c 100644
--- a/src/builder/arg_group.rs
+++ b/src/builder/arg_group.rs
@@ -188,6 +188,23 @@ impl ArgGroup {
         self
     }
 
+    /// Getters for all args. It will return a vector of `Id`
+    ///
+    /// # Example
+    ///
+    /// ```rust
+    /// # use clap::{ArgGroup};
+    /// let args: Vec<&str> = vec!["a1".into(), "a4".into()];
+    /// let grp = ArgGroup::new("program").args(&args);
+    ///
+    /// for (pos, arg) in grp.get_args().enumerate() {
+    ///     assert_eq!(*arg, args[pos]);
+    /// }
+    /// ```
+    pub fn get_args(&self) -> impl Iterator<Item = &Id> {
+        self.args.iter()
+    }
+
     /// Allows more than one of the [`Arg`]s in this group to be used. (Default: `false`)
     ///
     /// # Examples
@@ -240,6 +257,23 @@ impl ArgGroup {
         self
     }
 
+    /// Return true if the group allows more than one of the arguments
+    /// in this group to be used. (Default: `false`)
+    ///
+    /// # Example
+    ///
+    /// ```rust
+    /// # use clap::{ArgGroup};
+    /// let mut group = ArgGroup::new("myprog")
+    ///     .args(["f", "c"])
+    ///     .multiple(true);
+    ///
+    /// assert!(group.is_multiple());
+    /// ```
+    pub fn is_multiple(&mut self) -> bool {
+        self.multiple
+    }
+
     /// Require an argument from the group to be present when parsing.
     ///
     /// This is unless conflicting with another argument.  A required group will be displayed in
@@ -538,4 +572,25 @@ mod test {
         fn foo<T: Send + Sync>(_: T) {}
         foo(ArgGroup::new("test"))
     }
+
+    #[test]
+    fn arg_group_expose_is_multiple_helper() {
+        let args: Vec<Id> = vec!["a1".into(), "a4".into()];
+
+        let mut grp_multiple = ArgGroup::new("test_multiple").args(&args).multiple(true);
+        assert!(grp_multiple.is_multiple());
+
+        let mut grp_not_multiple = ArgGroup::new("test_multiple").args(&args).multiple(false);
+        assert!(!grp_not_multiple.is_multiple());
+    }
+
+    #[test]
+    fn arg_group_expose_get_args_helper() {
+        let args: Vec<Id> = vec!["a1".into(), "a4".into()];
+        let grp = ArgGroup::new("program").args(&args);
+
+        for (pos, arg) in grp.get_args().enumerate() {
+            assert_eq!(*arg, args[pos]);
+        }
+    }
 }
diff --git a/src/parser/parser.rs b/src/parser/parser.rs
index f2a05c33..dec42b77 100644
--- a/src/parser/parser.rs
+++ b/src/parser/parser.rs
@@ -1274,7 +1274,6 @@ impl<'cmd> Parser<'cmd> {
                 Ok(ParseResult::ValuesDone)
             }
             ArgAction::Help => {
-                debug_assert_eq!(raw_vals, Vec::<OsString>::new());
                 let use_long = match ident {
                     Some(Identifier::Long) => true,
                     Some(Identifier::Short) => false,
@@ -1285,7 +1284,6 @@ impl<'cmd> Parser<'cmd> {
                 Err(self.help_err(use_long))
             }
             ArgAction::Version => {
-                debug_assert_eq!(raw_vals, Vec::<OsString>::new());
                 let use_long = match ident {
                     Some(Identifier::Long) => true,
                     Some(Identifier::Short) => false,


Test patch:
diff --git a/tests/derive/doc_comments_help.rs b/tests/derive/doc_comments_help.rs
index d90a04bc..8aa4fa1e 100644
--- a/tests/derive/doc_comments_help.rs
+++ b/tests/derive/doc_comments_help.rs
@@ -14,7 +14,7 @@
 
 use crate::utils;
 
-use clap::{CommandFactory, Parser, ValueEnum};
+use clap::{CommandFactory, Parser, Subcommand, ValueEnum};
 
 #[test]
 fn doc_comments() {
@@ -212,14 +212,26 @@ fn multiline_separates_default() {
 }
 
 #[test]
-fn argenum_multiline_doc_comment() {
-    #[derive(ValueEnum, Clone)]
+fn value_enum_multiline_doc_comment() {
+    #[derive(Parser, Debug)]
+    struct Command {
+        x: LoremIpsum,
+    }
+
+    #[derive(ValueEnum, Clone, PartialEq, Debug)]
     enum LoremIpsum {
-        /// Multiline
+        /// Doc comment summary
         ///
-        /// Doc comment
+        /// The doc comment body is ignored
         Bar,
     }
+
+    let help = utils::get_long_help::<Command>();
+
+    assert!(help.contains("Doc comment summary"));
+
+    // There is no long help text for possible values. The long help only contains the summary.
+    assert!(!help.contains("The doc comment body is ignored"));
 }
 
 #[test]
@@ -248,3 +260,31 @@ fn doc_comment_about_handles_both_abouts() {
     // comment.
     assert_eq!(cmd.get_long_about(), None);
 }
+
+#[test]
+fn respect_subcommand_doc_comment() {
+    #[derive(Parser, Debug)]
+    pub enum Cmd {
+        /// For child
+        #[command(subcommand)]
+        Child(Child),
+    }
+
+    #[derive(Subcommand, Debug)]
+    pub enum Child {
+        One,
+        Twp,
+    }
+
+    const OUTPUT: &str = "\
+Usage: cmd <COMMAND>
+
+Commands:
+  child  For child
+  help   Print this message or the help of the given subcommand(s)
+
+Options:
+  -h, --help  Print help information
+";
+    utils::assert_output::<Cmd>("cmd --help", OUTPUT, false);
+}