CommandHelp
public struct CommandHelp
Structure that represents a Command information.
When the help is about to be printed, a CommandHelp
is generated from the current Command
.
A CommandHelp
represents all the info required to print the help message of a command.
a HelpGenerator
is created and passed this CommandHelp
.
the HelpGenerator
is used to print the help message string
-
The command name
Declaration
Swift
public let name: String
-
The command full name with the name of all its parents. For example
git show help
Declaration
Swift
public let fullName: String
-
The command usage string
Declaration
Swift
public let usage: String
-
The command full usage string containg the full name of the command (that contain the parents)
Declaration
Swift
public let fullUsage: String
-
The command long description message.
Declaration
Swift
public let longDescriptionMessage: String?
-
The command short description message.
Declaration
Swift
public let shortDescriptionMessage: String?
-
Does this command have an example
Declaration
Swift
public let hasExample: Bool
-
The command example message
Declaration
Swift
public let example: String?
-
Is this command deprecated
Declaration
Swift
public let isDeprecated: Bool
-
The command deprication message
Declaration
Swift
public let deprecationMessage: String?
-
Does this command have aliases
Declaration
Swift
public let hasAliases: Bool
-
The command aliases array
Declaration
Swift
public let aliases: [String]
-
The alias used to call the command Since the command can be called with different aliases. This variable holds the alias used
Declaration
Swift
public let aliasUsedToCallCommand: String
-
Does this command have sub commands
Declaration
Swift
public let hasSubCommands: Bool
-
The command subcommands
Declaration
Swift
public let subCommands: [CommandHelp]
-
Does this command have flags
Declaration
Swift
public let hasFlags: Bool
-
The command local flags. These are the flags that the command defines.
Declaration
Swift
public let localFlags: [FlagHelp]
-
The command global flags. These are the flags the command inherited from its parents. Contains a list of inheritable flags.
Declaration
Swift
public let globalFlags: [FlagHelp]