Repository: clap-rs/clap (Rust)

Issue:
Allow different documentation for subcommands for SUBCOMMANDS list and subcommand's help
### Discussed in https://github.com/clap-rs/clap/discussions/2556

<div type='discussions-op-text'>

<sup>Originally posted by **anatawa12** June 20, 2021</sup>
### Please complete the following tasks

- [X] I have searched the [discussions](https://github.com/clap-rs/clap/discussions)
- [X] I have searched the existing issues

### Clap Version

= 3.0.0-beta.2

### Describe your use case

For a subcommand with long documentation, in the `SUBCOMMANDS` list in parent command, I want to show a summary of a command instead of long documentation.

### Describe the solution you'd like

Add an option to show only first line in the documentation on the subcommand's struct or field.
```
/// Simple description
/// 
/// long documentation
#[derive(Clap)]
#[clap(single_line_doc_in_parent_doc)]
pub struct SubcommandOptions {
}
```

### Alternatives, if applicable

_No response_

### Additional Context

I'm using #[derive(Clap)] pattern.
</div>


Discussion:
The solution is to always show short help in the `SUBCOMMANDS` list.



Patch:
diff --git a/src/output/help.rs b/src/output/help.rs
index b4b280ee1c9..54a8a2cc12a 100644
--- a/src/output/help.rs
+++ b/src/output/help.rs
@@ -701,11 +701,7 @@ impl<'help, 'app, 'parser, 'writer> Help<'help, 'app, 'parser, 'writer> {
 
         let spec_vals = &self.sc_spec_vals(app);
 
-        let about = if self.use_long {
-            app.long_about.unwrap_or_else(|| app.about.unwrap_or(""))
-        } else {
-            app.about.unwrap_or_else(|| app.long_about.unwrap_or(""))
-        };
+        let about = app.about.unwrap_or_else(|| app.long_about.unwrap_or(""));
 
         self.subcmd(sc_str, next_line_help, longest)?;
         self.help(false, about, spec_vals, next_line_help, longest)


Test patch:
diff --git a/tests/help.rs b/tests/help.rs
index 39a56927707..f19f7408dc0 100644
--- a/tests/help.rs
+++ b/tests/help.rs
@@ -660,6 +660,22 @@ FLAGS:
     -V, --version          Prints version information
     -x";
 
+static ABOUT_IN_SUBCOMMANDS_LIST: &str = "about-in-subcommands-list 
+
+USAGE:
+    about-in-subcommands-list [SUBCOMMAND]
+
+FLAGS:
+    -h, --help
+            Prints help information
+
+SUBCOMMANDS:
+    help
+            Prints this message or the help of the given subcommand(s)
+    sub
+            short about sub
+";
+
 fn setup() -> App<'static> {
     App::new("test")
         .author("Kevin K.")
@@ -2236,6 +2252,25 @@ fn option_usage_order() {
     ));
 }
 
+#[test]
+fn about_in_subcommands_list() {
+    let app = App::new("about-in-subcommands-list")
+        .setting(AppSettings::ColorNever)
+        .global_setting(AppSettings::DisableVersionFlag)
+        .subcommand(
+            App::new("sub")
+                .long_about("long about sub")
+                .about("short about sub"),
+        );
+
+    assert!(utils::compare_output(
+        app,
+        "about-in-subcommands-list --help",
+        ABOUT_IN_SUBCOMMANDS_LIST,
+        false
+    ));
+}
+
 #[test]
 fn issue_1794_usage() {
     static USAGE_WITH_GROUP: &'static str = "hello