We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d69a33a + 19fca32 commit e070247Copy full SHA for e070247
Sources/Commandant/HelpCommand.swift
@@ -22,14 +22,15 @@ public struct HelpCommand<ClientError: Error>: CommandProtocol {
22
public typealias Options = HelpOptions<ClientError>
23
24
public let verb = "help"
25
- public let function = "Display general or command-specific help"
26
-
+ public let function: String
+
27
private let registry: CommandRegistry<ClientError>
28
29
/// Initializes the command to provide help from the given registry of
30
/// commands.
31
- public init(registry: CommandRegistry<ClientError>) {
+ public init(registry: CommandRegistry<ClientError>, function: String? = nil) {
32
self.registry = registry
33
+ self.function = function ?? "Display general or command-specific help"
34
}
35
36
public func run(_ options: Options) -> Result<(), ClientError> {
0 commit comments