Skip to content

Commit 76fd51e

Browse files
committed
feat: Updates the commander describing
1 parent 793f490 commit 76fd51e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/Commander/Commands/CommandDescriber.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ internal struct CommandDescriber {
5050
self.intents = intents
5151
}
5252

53-
internal func describe(_ commander: Commander.Type) -> String {
54-
let commandsSymbols = commander.allCommands.map { ($0.symbol, $0.usage) }
53+
internal func describe(commander usage: String, commands: [AnyCommandRepresentable.Type]) -> String {
54+
let commandsSymbols = commands.map { ($0.symbol, $0.usage) }
5555

5656
let count = commandsSymbols.reduce(0) { max($0, $1.0.count) }
5757
let alignment = String(repeating: " ", count: count)
@@ -61,7 +61,7 @@ internal struct CommandDescriber {
6161
\(returns(0))
6262
\(intents(1))$ \(path) COMMAND
6363
\(returns(0))
64-
\(intents(2))\(Commander.usage)
64+
\(intents(2))\(usage)
6565
\(returns(0))
6666
Commands:
6767
\(returns(0))

0 commit comments

Comments
 (0)