File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,7 +113,11 @@ impl<'cmd> Usage<'cmd> {
113113 }
114114 let mut cmd = self . cmd . clone ( ) ;
115115 cmd. build ( ) ;
116- for ( i, sub) in cmd. get_subcommands ( ) . enumerate ( ) {
116+ for ( i, sub) in cmd
117+ . get_subcommands ( )
118+ . filter ( |c| !c. is_hide_set ( ) )
119+ . enumerate ( )
120+ {
117121 if i != 0 {
118122 styled. trim_end ( ) ;
119123 let _ = write ! ( styled, "{}" , USAGE_SEP ) ;
Original file line number Diff line number Diff line change @@ -3314,7 +3314,6 @@ fn flatten_single_hidden_command() {
33143314 parent command
33153315
33163316Usage: parent [OPTIONS]
3317- parent child1 [OPTIONS]
33183317 parent help [COMMAND]...
33193318
33203319Options:
@@ -3346,7 +3345,6 @@ parent command
33463345Usage: parent [OPTIONS]
33473346 parent child1 [OPTIONS]
33483347 parent child2 [OPTIONS]
3349- parent child3 [OPTIONS]
33503348 parent help [COMMAND]...
33513349
33523350Options:
@@ -3406,7 +3404,6 @@ Usage: parent [OPTIONS]
34063404 parent child1 grandchild3 [OPTIONS]
34073405 parent child1 help [COMMAND]
34083406 parent child2 [OPTIONS]
3409- parent child3 [OPTIONS] [COMMAND]
34103407 parent help [COMMAND]...
34113408
34123409Options:
You can’t perform that action at this time.
0 commit comments