File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 11use std:: path:: PathBuf ;
22
3- use clap:: { ArgAction , Parser , ValueEnum } ;
3+ use clap:: {
4+ builder:: {
5+ styling:: { AnsiColor , Effects } ,
6+ Styles ,
7+ } ,
8+ ArgAction ,
9+ Parser ,
10+ ValueEnum ,
11+ } ;
12+
413use clap_complete:: Shell ;
514
615#[ derive( Parser ) ]
7- #[ command( about, version) ]
8- #[ command( next_line_help = true ) ]
9- #[ command( disable_version_flag = true ) ]
16+ #[ clap( about, version) ]
17+ #[ clap( next_line_help = true ) ]
18+ #[ clap( disable_version_flag = true ) ]
19+ #[ clap(
20+ styles( Styles :: styled( )
21+ . header( AnsiColor :: Yellow . on_default( ) | Effects :: BOLD )
22+ . usage( AnsiColor :: Yellow . on_default( ) | Effects :: BOLD )
23+ . literal( AnsiColor :: Green . on_default( ) | Effects :: BOLD )
24+ . placeholder( AnsiColor :: Cyan . on_default( ) )
25+ )
26+ ) ]
1027pub struct App {
1128 /// File to read.
1229 pub file : Option < PathBuf > ,
You can’t perform that action at this time.
0 commit comments