* Formats the unrecognized option with command context and suggestions. * * @since 4.0.0
()
| 135 | * @since 4.0.0 |
| 136 | */ |
| 137 | override get message() { |
| 138 | const suggestionText = this.suggestions.length > 0 |
| 139 | ? `\n\n Did you mean this?\n ${this.suggestions.join("\n ")}` |
| 140 | : "" |
| 141 | const baseMessage = this.command |
| 142 | ? `Unrecognized flag: ${this.option} in command ${this.command.join(" ")}` |
| 143 | : `Unrecognized flag: ${this.option}` |
| 144 | return baseMessage + suggestionText |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | /** |