You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The help screen is automatically shown to users when they call your command with the help flag. You can generate the same text from within your program by calling the `helpMessage()` method.
172
+
173
+
```swift
174
+
let help =Repeat.helpMessage()
175
+
// `help` matches the output above
176
+
177
+
let fortyColumnHelp =Repeat.helpMessage(columns: 40)
178
+
// `fortyColumnHelp` is the same help screen, but wrapped to 40 columns
179
+
```
180
+
181
+
When generating help text for a subcommand, call `helpMessage(for:)` on the `ParsableCommand` type that represents the root of the command tree and pass the subcommand type as a parameter to ensure the correct display.
0 commit comments