File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use anstream::stream::IsTerminal;
2
2
use camino:: { FromPathBufError , Utf8PathBuf } ;
3
3
use clap:: builder:: Styles ;
4
4
use clap:: builder:: styling:: AnsiColor ;
5
- use clap:: { Parser , Subcommand } ;
5
+ use clap:: { ArgAction , Parser , Subcommand } ;
6
6
use config:: Config ;
7
7
use miette:: Report ;
8
8
use rv_cache:: CacheArgs ;
@@ -39,6 +39,7 @@ const STYLES: Styles = Styles::styled()
39
39
#[ command( name = "rv" ) ]
40
40
#[ command( styles=STYLES ) ]
41
41
#[ command( version) ]
42
+ #[ command( disable_help_flag = true ) ]
42
43
struct Cli {
43
44
/// Ruby directories to search for installations
44
45
#[ arg( long = "ruby-dir" ) ]
@@ -54,6 +55,10 @@ struct Cli {
54
55
#[ command( flatten) ]
55
56
verbose : clap_verbosity_flag:: Verbosity < clap_verbosity_flag:: InfoLevel > ,
56
57
58
+ // Override the help flag --help and -h to both show HelpShort
59
+ #[ arg( short = 'h' , long = "help" , action = ArgAction :: HelpShort , global = true ) ]
60
+ _help : Option < bool > ,
61
+
57
62
#[ arg( long, env = "RV_COLOR" ) ]
58
63
color : Option < ColorMode > ,
59
64
You can’t perform that action at this time.
0 commit comments