File tree 1 file changed +21
-4
lines changed
1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 1
1
use std:: path:: PathBuf ;
2
2
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
+
4
13
use clap_complete:: Shell ;
5
14
6
15
#[ 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
+ ) ]
10
27
pub struct App {
11
28
/// File to read.
12
29
pub file : Option < PathBuf > ,
You can’t perform that action at this time.
0 commit comments