Skip to content

Instance Method

group(help:)

Creates a CommandGroup for this Commands.
func group(help: String = "") -> any CommandGroup

Parameters

help

Optional help messages to include.

Return Value

A CommandGroup with commands and defaultCommand configured.

Discussion

var config = Commands()
config.use(CowsayCommand(), as: "cowsay")
let group = config.group(help: "Some help for cosway group...")

try console.run(group, with: context)