@@ -39,14 +39,14 @@ export abstract class HelpBase extends HelpFormatter {
3939 * Show help, used in multi-command CLIs
4040 * @param args passed into your command, useful for determining which type of help to display
4141 */
42- public abstract async showHelp ( argv : string [ ] ) : Promise < void > ;
42+ public abstract showHelp ( argv : string [ ] ) : Promise < void > ;
4343
4444 /**
4545 * Show help for an individual command
4646 * @param command
4747 * @param topics
4848 */
49- public abstract async showCommandHelp ( command : Interfaces . Command , topics : Interfaces . Topic [ ] ) : Promise < void > ;
49+ public abstract showCommandHelp ( command : Interfaces . Command , topics : Interfaces . Topic [ ] ) : Promise < void > ;
5050}
5151
5252export class Help extends HelpBase {
@@ -108,7 +108,7 @@ export class Help extends HelpBase {
108108 }
109109
110110 const topic = this . config . findTopic ( subject )
111- if ( topic ) {
111+ if ( topic ) {
112112 await this . showTopicHelp ( topic )
113113 return
114114 }
@@ -122,6 +122,10 @@ export class Help extends HelpBase {
122122
123123 const subTopics = this . sortedTopics . filter ( t => t . name . startsWith ( name + ':' ) && t . name . split ( ':' ) . length === depth + 1 )
124124 const subCommands = this . sortedCommands . filter ( c => c . id . startsWith ( name + ':' ) && c . id . split ( ':' ) . length === depth + 1 )
125+ const plugin = this . config . plugins . find ( p => p . name === command . pluginName )
126+
127+ const state = this . config . pjson ?. oclif ?. state || plugin ?. pjson ?. oclif ?. state || command . state
128+ if ( state ) console . log ( `This command is in ${ state } .\n` )
125129
126130 const summary = this . summary ( command )
127131 if ( summary ) console . log ( summary + '\n' )
@@ -143,6 +147,8 @@ export class Help extends HelpBase {
143147 let rootTopics = this . sortedTopics
144148 let rootCommands = this . sortedCommands
145149
150+ const state = this . config . pjson ?. oclif ?. state
151+ if ( state ) console . log ( `${ this . config . bin } is in ${ state } .\n` )
146152 console . log ( this . formatRoot ( ) )
147153 console . log ( '' )
148154
@@ -170,6 +176,9 @@ export class Help extends HelpBase {
170176 const subTopics = this . sortedTopics . filter ( t => t . name . startsWith ( name + ':' ) && t . name . split ( ':' ) . length === depth + 1 )
171177 const commands = this . sortedCommands . filter ( c => c . id . startsWith ( name + ':' ) && c . id . split ( ':' ) . length === depth + 1 )
172178
179+ const state = this . config . pjson ?. oclif ?. state
180+ if ( state ) console . log ( `This topic is in ${ state } .\n` )
181+
173182 console . log ( this . formatTopic ( topic ) )
174183
175184 if ( subTopics . length > 0 ) {
0 commit comments