File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -657,12 +657,15 @@ impl HelpTemplate<'_, '_> {
657657 help. indent ( "" , & trailing_indent) ;
658658 self . writer . push_styled ( & help) ;
659659
660+ let mut has_possible_values = false ;
660661 if let Some ( arg) = arg {
661662 if !arg. is_hide_possible_values_set ( ) && self . use_long_pv ( arg) {
662663 const DASH_SPACE : usize = "- " . len ( ) ;
663664 let possible_vals = arg. get_possible_values ( ) ;
664665 if !possible_vals. is_empty ( ) {
665666 debug ! ( "HelpTemplate::help: Found possible vals...{possible_vals:?}" ) ;
667+ has_possible_values = true ;
668+
666669 let longest = possible_vals
667670 . iter ( )
668671 . filter ( |f| !f. is_hide_set ( ) )
@@ -709,7 +712,7 @@ impl HelpTemplate<'_, '_> {
709712
710713 if !spec_vals. is_empty ( ) && next_line_specs {
711714 let mut help = StyledStr :: new ( ) ;
712- if !help_is_empty {
715+ if !help_is_empty || has_possible_values {
713716 let sep = "\n \n " ;
714717 help. push_str ( sep) ;
715718 }
Original file line number Diff line number Diff line change @@ -3131,7 +3131,9 @@ Options:
31313131 -c, --config <MODE>
31323132 Possible values:
31333133 - fast
3134- - slow: slower than fast[default: fast]
3134+ - slow: slower than fast
3135+
3136+ [default: fast]
31353137
31363138 -h, --help
31373139 Print help (see a summary with '-h')
You can’t perform that action at this time.
0 commit comments