@@ -38,6 +38,10 @@ public struct CommandConfiguration {
38
38
/// A longer description of this command, to be shown in the extended help
39
39
/// display.
40
40
public var discussion : String
41
+
42
+ /// Additional description of this command to be shown in supplemental content
43
+ /// such as manuals.
44
+ public var supplementalDiscussion : String
41
45
42
46
/// Version information for this command.
43
47
public var version : String
@@ -67,6 +71,8 @@ public struct CommandConfiguration {
67
71
/// automatically generating a usage description. Passing an empty string
68
72
/// hides the usage string altogether.
69
73
/// - discussion: A longer description of the command.
74
+ /// - supplementalDiscussion: Additional description of the command for
75
+ /// supplemental content.
70
76
/// - version: The version number for this command. When you provide a
71
77
/// non-empty string, the argument parser prints it if the user provides
72
78
/// a `--version` flag.
@@ -85,6 +91,7 @@ public struct CommandConfiguration {
85
91
abstract: String = " " ,
86
92
usage: String ? = nil ,
87
93
discussion: String = " " ,
94
+ supplementalDiscussion: String = " " ,
88
95
version: String = " " ,
89
96
shouldDisplay: Bool = true ,
90
97
subcommands: [ ParsableCommand . Type ] = [ ] ,
@@ -95,6 +102,7 @@ public struct CommandConfiguration {
95
102
self . abstract = abstract
96
103
self . usage = usage
97
104
self . discussion = discussion
105
+ self . supplementalDiscussion = supplementalDiscussion
98
106
self . version = version
99
107
self . shouldDisplay = shouldDisplay
100
108
self . subcommands = subcommands
@@ -110,6 +118,7 @@ public struct CommandConfiguration {
110
118
abstract: String = " " ,
111
119
usage: String ? = nil ,
112
120
discussion: String = " " ,
121
+ supplementalDiscussion: String = " " ,
113
122
version: String = " " ,
114
123
shouldDisplay: Bool = true ,
115
124
subcommands: [ ParsableCommand . Type ] = [ ] ,
@@ -121,6 +130,7 @@ public struct CommandConfiguration {
121
130
self . abstract = abstract
122
131
self . usage = usage
123
132
self . discussion = discussion
133
+ self . supplementalDiscussion = " "
124
134
self . version = version
125
135
self . shouldDisplay = shouldDisplay
126
136
self . subcommands = subcommands
@@ -130,7 +140,7 @@ public struct CommandConfiguration {
130
140
}
131
141
132
142
extension CommandConfiguration {
133
- @available ( * , deprecated, message: " Use the memberwise initializer with the usage parameter. " )
143
+ @available ( * , deprecated, message: " Use the member-wise initializer with the usage parameter. " )
134
144
public init (
135
145
commandName: String ? ,
136
146
abstract: String ,
@@ -146,6 +156,32 @@ extension CommandConfiguration {
146
156
abstract: abstract,
147
157
usage: " " ,
148
158
discussion: discussion,
159
+ supplementalDiscussion: " " ,
160
+ version: version,
161
+ shouldDisplay: shouldDisplay,
162
+ subcommands: subcommands,
163
+ defaultSubcommand: defaultSubcommand,
164
+ helpNames: helpNames)
165
+ }
166
+
167
+ @available ( * , deprecated, message: " Use the member-wise initializer with the extendedDiscussion parameter. " )
168
+ public init (
169
+ commandName: String ? ,
170
+ abstract: String ,
171
+ usage: String ,
172
+ discussion: String ,
173
+ version: String ,
174
+ shouldDisplay: Bool ,
175
+ subcommands: [ ParsableCommand . Type ] ,
176
+ defaultSubcommand: ParsableCommand . Type ? ,
177
+ helpNames: NameSpecification ?
178
+ ) {
179
+ self . init (
180
+ commandName: commandName,
181
+ abstract: abstract,
182
+ usage: usage,
183
+ discussion: discussion,
184
+ supplementalDiscussion: " " ,
149
185
version: version,
150
186
shouldDisplay: shouldDisplay,
151
187
subcommands: subcommands,
0 commit comments