@@ -2,7 +2,9 @@ use crate::info::langs::language::{Language, LanguageType};
22use crate :: info:: utils:: info_field:: InfoType ;
33use crate :: ui:: printer:: SerializationFormat ;
44use anyhow:: Result ;
5+ use clap:: builder:: styling:: AnsiColor ;
56use clap:: builder:: PossibleValuesParser ;
7+ use clap:: builder:: Styles ;
68use clap:: builder:: TypedValueParser as _;
79use clap:: { value_parser, Args , Command , Parser , ValueHint } ;
810use clap_complete:: { generate, Generator , Shell } ;
@@ -20,9 +22,15 @@ use strum::IntoEnumIterator;
2022const COLOR_RESOLUTIONS : [ & str ; 5 ] = [ "16" , "32" , "64" , "128" , "256" ] ;
2123pub const NO_BOTS_DEFAULT_REGEX_PATTERN : & str = r"(?:-|\s)[Bb]ot$|\[[Bb]ot\]" ;
2224
25+ const STYLES : Styles = Styles :: styled ( )
26+ . header ( AnsiColor :: Yellow . on_default ( ) )
27+ . usage ( AnsiColor :: Green . on_default ( ) )
28+ . literal ( AnsiColor :: Green . on_default ( ) )
29+ . placeholder ( AnsiColor :: Green . on_default ( ) ) ;
30+
2331#[ derive( Clone , Debug , Parser , PartialEq , Eq ) ]
2432#[ command( version, about) ]
25- #[ command( styles = clap_cargo :: style :: CLAP_STYLING ) ]
33+ #[ command( styles = STYLES ) ]
2634pub struct CliOptions {
2735 /// Run as if onefetch was started in <input> instead of the current working directory
2836 #[ arg( default_value = "." , hide_default_value = true , value_hint = ValueHint :: DirPath ) ]
0 commit comments