Skip to content

Commit

Permalink
feat: Add API to get command names
Browse files Browse the repository at this point in the history
  • Loading branch information
kylef committed Oct 14, 2017
1 parent 53da00d commit 02778e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Commander/Group.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ open class Group : CommandType {
}

var commands = [SubCommand]()
public var commandNames: [String] {
return commands.map { $0.name }
}

// When set, allows you to override the default unknown command behaviour
public var unknownCommand: ((_ name: String, _ parser: ArgumentParser) throws -> ())?
Expand Down

0 comments on commit 02778e3

Please sign in to comment.