@@ -49,6 +49,8 @@ public struct CommandInfoV0: Codable, Hashable {
4949
5050 /// Name used to invoke the command.
5151 public var commandName : String
52+ /// List of command aliases.
53+ public var aliases : [ String ] ?
5254 /// Short description of the command's functionality.
5355 public var abstract : String ?
5456 /// Extended description of the command's functionality.
@@ -66,6 +68,7 @@ public struct CommandInfoV0: Codable, Hashable {
6668 superCommands: [ String ] ,
6769 shouldDisplay: Bool ,
6870 commandName: String ,
71+ aliases: [ String ] ? ,
6972 abstract: String ,
7073 discussion: String ,
7174 defaultSubcommand: String ? ,
@@ -76,6 +79,7 @@ public struct CommandInfoV0: Codable, Hashable {
7679 self . shouldDisplay = shouldDisplay
7780
7881 self . commandName = commandName
82+ self . aliases = aliases? . nonEmpty
7983 self . abstract = abstract. nonEmpty
8084 self . discussion = discussion. nonEmpty
8185
@@ -89,6 +93,8 @@ public struct CommandInfoV0: Codable, Hashable {
8993 self . superCommands = try container. decodeIfPresent (
9094 [ String ] . self, forKey: . superCommands)
9195 self . commandName = try container. decode ( String . self, forKey: . commandName)
96+ self . aliases = try container. decodeIfPresent (
97+ [ String ] . self, forKey: . aliases)
9298 self . abstract = try container. decodeIfPresent (
9399 String . self, forKey: . abstract)
94100 self . discussion = try container. decodeIfPresent (
0 commit comments