@@ -10,12 +10,12 @@ use crate::{
1010} ;
1111
1212fn format_subcommand ( command : & str , description : & str ) -> String {
13- let command = command. yellow ( ) ;
13+ let command = command. bright_yellow ( ) ;
1414 format ! ( "{command}\n {}" , format_description( description) )
1515}
1616
1717pub fn format_description ( description : & str ) -> String {
18- format ! ( "{} {description}" , "»" . black ( ) )
18+ format ! ( "{} {description}" , "»" . bright_black ( ) )
1919}
2020
2121pub static HELP_FLAG : Flag < ' static > = Flag {
@@ -38,13 +38,13 @@ pub static VERSION_FLAG: Flag<'static> = Flag {
3838
3939pub fn help ( command : Option < & str > ) -> anyhow:: Result < ( ) > {
4040 let author = "Nikita Revenco " . italic ( ) ;
41- let less_than = "<" . black ( ) . italic ( ) ;
41+ let less_than = "<" . bright_black ( ) . italic ( ) ;
4242 let email =
"[email protected] " . italic ( ) ; 43- let greater_than = ">" . black ( ) . italic ( ) ;
44- let app_name = APP_NAME . blue ( ) ;
45- let flags_label = "[<flags>]" . magenta ( ) ;
46- let command_str = "<command>" . yellow ( ) ;
47- let args = "[<args>]" . green ( ) ;
43+ let greater_than = ">" . bright_black ( ) . italic ( ) ;
44+ let app_name = APP_NAME . bright_blue ( ) ;
45+ let flags_label = "[<flags>]" . bright_magenta ( ) ;
46+ let command_str = "<command>" . bright_yellow ( ) ;
47+ let args = "[<args>]" . bright_green ( ) ;
4848 let version = env ! ( "CARGO_PKG_VERSION" ) ;
4949 let init = format_subcommand ( "init" , "Create example config file" ) ;
5050 let pr_fetch = format_subcommand (
@@ -62,7 +62,7 @@ pub fn help(command: Option<&str>) -> anyhow::Result<()> {
6262
6363 match command {
6464 Some ( cmd_name @ "init" ) => {
65- let this_command_name = format ! ( "{app_name} {}" , cmd_name. yellow ( ) ) ;
65+ let this_command_name = format ! ( "{app_name} {}" , cmd_name. bright_yellow ( ) ) ;
6666
6767 let description = format_description ( "Create example config file" ) ;
6868
@@ -82,7 +82,7 @@ pub fn help(command: Option<&str>) -> anyhow::Result<()> {
8282 ) ;
8383 }
8484 Some ( cmd_name @ "run" ) => {
85- let this_command_name = format ! ( "{app_name} {}" , cmd_name. yellow ( ) ) ;
85+ let this_command_name = format ! ( "{app_name} {}" , cmd_name. bright_yellow ( ) ) ;
8686
8787 let description = format_description ( "Create example config file" ) ;
8888
@@ -102,7 +102,7 @@ pub fn help(command: Option<&str>) -> anyhow::Result<()> {
102102 ) ;
103103 }
104104 Some ( cmd_name @ "gen-patch" ) => {
105- let this_command_name = format ! ( "{app_name} {}" , cmd_name. yellow ( ) ) ;
105+ let this_command_name = format ! ( "{app_name} {}" , cmd_name. bright_yellow ( ) ) ;
106106
107107 let patch_filename_flag = format_flag ( & GEN_PATCH_NAME_FLAG ) ;
108108
@@ -111,25 +111,25 @@ pub fn help(command: Option<&str>) -> anyhow::Result<()> {
111111 let example_1 = format ! (
112112 "{}
113113 {}" ,
114- "133cbaae83f710b793c98018cea697a04479bbe4" . green ( ) ,
114+ "133cbaae83f710b793c98018cea697a04479bbe4" . bright_green ( ) ,
115115 format_description( "Generate a single .patch file from one commit hash" )
116116 ) ;
117117
118118 let example_2 = format ! (
119119 "{}
120120 {}" ,
121- "133cbaae83f710b793c98018cea697a04479bbe4 9ad5aa637ccf363b5d6713f66d0c2830736c35a9 cc75a895f344cf2fe83eaf6d78dfb7aeac8b33a4" . green ( ) ,
121+ "133cbaae83f710b793c98018cea697a04479bbe4 9ad5aa637ccf363b5d6713f66d0c2830736c35a9 cc75a895f344cf2fe83eaf6d78dfb7aeac8b33a4" . bright_green ( ) ,
122122 format_description( "Generate several .patch files from several commit hashes" )
123123 ) ;
124124
125125 let example_3 = format ! (
126126 "{} {} {} {} {}
127127 {}" ,
128- "133cbaae83f710b793c98018cea697a04479bbe4" . green ( ) ,
129- "--patch-filename=some-patch" . magenta ( ) ,
130- "9ad5aa637ccf363b5d6713f66d0c2830736c35a9" . green ( ) ,
131- "--patch-filename=another-patch" . magenta ( ) ,
132- "cc75a895f344cf2fe83eaf6d78dfb7aeac8b33a4" . green ( ) ,
128+ "133cbaae83f710b793c98018cea697a04479bbe4" . bright_green ( ) ,
129+ "--patch-filename=some-patch" . bright_magenta ( ) ,
130+ "9ad5aa637ccf363b5d6713f66d0c2830736c35a9" . bright_green ( ) ,
131+ "--patch-filename=another-patch" . bright_magenta ( ) ,
132+ "cc75a895f344cf2fe83eaf6d78dfb7aeac8b33a4" . bright_green ( ) ,
133133 format_description(
134134 "Generate several .patch files from several commit hashes and give 2 of them custom names"
135135 )
@@ -166,25 +166,25 @@ pub fn help(command: Option<&str>) -> anyhow::Result<()> {
166166 let example_1 = format ! (
167167 "{}
168168 {}" ,
169- "11745" . green ( ) ,
169+ "11745" . bright_green ( ) ,
170170 format_description( "Fetch a single pull request" )
171171 ) ;
172172
173173 let example_2 = format ! (
174174 "{}
175175 {}" ,
176- "11745 10000 9191 600" . green ( ) ,
176+ "11745 10000 9191 600" . bright_green ( ) ,
177177 format_description( "Fetch several pull requests" )
178178 ) ;
179179
180180 let example_3 = format ! (
181181 "{} {} {} {} {}
182182 {}" ,
183- "11745 10000" . green ( ) ,
184- "--branch-name=some-pr" . magenta ( ) ,
185- "9191" . green ( ) ,
186- "--branch-name=another-pr" . magenta ( ) ,
187- "600" . green ( ) ,
183+ "11745 10000" . bright_green ( ) ,
184+ "--branch-name=some-pr" . bright_magenta ( ) ,
185+ "9191" . bright_green ( ) ,
186+ "--branch-name=another-pr" . bright_magenta ( ) ,
187+ "600" . bright_green ( ) ,
188188 format_description(
189189 "Fetch several pull requests and choose custom branch names for the pull requests #10000 and #9191"
190190 )
@@ -193,23 +193,23 @@ pub fn help(command: Option<&str>) -> anyhow::Result<()> {
193193 let example_4 = format ! (
194194 "{} {} {}
195195 {}" ,
196- "--repo-name=helix-editor/helix" . magenta ( ) ,
197- "11745 10000 9191 600" . green ( ) ,
198- "--checkout" . magenta ( ) ,
196+ "--repo-name=helix-editor/helix" . bright_magenta ( ) ,
197+ "11745 10000 9191 600" . bright_green ( ) ,
198+ "--checkout" . bright_magenta ( ) ,
199199 format_description( "Fetch several pull requests, checkout the first one and use a custom github repo: https://github.com/helix-editor/helix" )
200200 ) ;
201201
202202 let example_5 = format ! (
203203 "{}
204204 {}" ,
205- "11745 10000@be8f264327f6ae729a0b372ef01f6fde49a78310 9191 600@5d10fa5beb917a0dbe0ef8441d14b3d0dd15227b" . green ( ) ,
205+ "11745 10000@be8f264327f6ae729a0b372ef01f6fde49a78310 9191 600@5d10fa5beb917a0dbe0ef8441d14b3d0dd15227b" . bright_green ( ) ,
206206 format_description( "Fetch several pull requests at a certain commit" )
207207 ) ;
208208
209209 let branch_name_flag = format_flag ( & PR_FETCH_BRANCH_NAME_FLAG ) ;
210210 let checkout_flag = format_flag ( & PR_FETCH_CHECKOUT_FLAG ) ;
211211 let repo_name_flag = format_flag ( & PR_FETCH_REPO_NAME_FLAG ) ;
212- let this_command_name = format ! ( "{app_name} {}" , cmd_name. yellow ( ) ) ;
212+ let this_command_name = format ! ( "{app_name} {}" , cmd_name. bright_yellow ( ) ) ;
213213
214214 println ! (
215215 "
0 commit comments