File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ pub const HELP_TEMPLATE: &str = color_print::cstr!(
119119 <green,bold>scrape</> Scrape web content to markdown/text/html
120120 <green,bold>stats</> Show usage statistics
121121 <green,bold>completion</> Generate shell completion scripts
122+ <dim>Note: Commands without subcommands only support --help; nested commands like github also accept help.</>
122123
123124<cyan,bold>🔧 Maintenance:</>
124125 <green,bold>upgrade</> Check for and install updates
Original file line number Diff line number Diff line change 1+ use clap:: CommandFactory ;
2+ use cortex_cli:: cli:: Cli ;
3+
4+ #[ test]
5+ fn root_help_documents_utility_help_syntax_split ( ) {
6+ let help = Cli :: command ( ) . render_long_help ( ) . to_string ( ) ;
7+
8+ assert ! (
9+ help. contains( "Commands without subcommands only support --help" ) ,
10+ "root help should explain why `cortex github help` works while single-purpose utilities use `--help`:\n {help}"
11+ ) ;
12+ }
You can’t perform that action at this time.
0 commit comments