@@ -18,8 +18,12 @@ const MB: u64 = 1024_u64.pow(2);
18
18
const GB : u64 = 1024_u64 . pow ( 3 ) ;
19
19
const TB : u64 = 1024_u64 . pow ( 4 ) ;
20
20
21
+ // on white
22
+ const NOTES_INFO : & [ & ' static str ] = & [ "todo" , "info" ] ;
21
23
// on yellow
22
- const IMPORTANT : & [ & ' static str ] = & [ "todo" , "fixme" , "readme" , "important" ] ;
24
+ const NOTES_IMPORTANT : & [ & ' static str ] = & [ "readme" , "important" ] ;
25
+ // on red
26
+ const NOTES_WARN : & [ & ' static str ] = & [ "fixme" , "warn" , "warning" ] ;
23
27
// red
24
28
const EXECUTABLE : & [ & ' static str ] = & [ "exe" , "msi" , "bat" ] ;
25
29
// yellow
@@ -580,7 +584,18 @@ fn print_output_short(name_or_path: String, filetype: &str, file_extension: Stri
580
584
match filetype {
581
585
"file" => {
582
586
let mut name = String :: new ( ) ;
583
- if IMPORTANT
587
+ if NOTES_INFO
588
+ . iter ( )
589
+ . any ( |it| name_or_path. to_lowercase ( ) . contains ( it) )
590
+ {
591
+ let cstr = format ! (
592
+ "{}" ,
593
+ name_or_path
594
+ . on_truecolor( 198 , 200 , 209 )
595
+ . truecolor( 30 , 33 , 50 )
596
+ ) ;
597
+ name. push_str ( & cstr) ;
598
+ } else if NOTES_IMPORTANT
584
599
. iter ( )
585
600
. any ( |it| name_or_path. to_lowercase ( ) . contains ( it) )
586
601
{
@@ -591,6 +606,17 @@ fn print_output_short(name_or_path: String, filetype: &str, file_extension: Stri
591
606
. truecolor( 30 , 33 , 50 )
592
607
) ;
593
608
name. push_str ( & cstr) ;
609
+ } else if NOTES_WARN
610
+ . iter ( )
611
+ . any ( |it| name_or_path. to_lowercase ( ) . contains ( it) )
612
+ {
613
+ let cstr = format ! (
614
+ "{}" ,
615
+ name_or_path
616
+ . on_truecolor( 226 , 120 , 120 )
617
+ . truecolor( 30 , 33 , 50 )
618
+ ) ;
619
+ name. push_str ( & cstr) ;
594
620
} else if EXECUTABLE . iter ( ) . any ( |it| & file_extension == it) {
595
621
let cstr = format ! ( "{}" , name_or_path. bold( ) . truecolor( 226 , 120 , 120 ) ) ;
596
622
name. push_str ( & cstr) ;
@@ -655,7 +681,18 @@ fn print_output_long(
655
681
"file" => {
656
682
ftype. push_str ( "." ) ;
657
683
if colour {
658
- if IMPORTANT
684
+ if NOTES_INFO
685
+ . iter ( )
686
+ . any ( |it| name_or_path. to_lowercase ( ) . contains ( it) )
687
+ {
688
+ let cstr = format ! (
689
+ "{}" ,
690
+ name_or_path
691
+ . on_truecolor( 198 , 200 , 209 )
692
+ . truecolor( 30 , 33 , 50 )
693
+ ) ;
694
+ name. push_str ( & cstr) ;
695
+ } else if NOTES_IMPORTANT
659
696
. iter ( )
660
697
. any ( |it| name_or_path. to_lowercase ( ) . contains ( it) )
661
698
{
@@ -666,6 +703,17 @@ fn print_output_long(
666
703
. truecolor( 30 , 33 , 50 )
667
704
) ;
668
705
name. push_str ( & cstr) ;
706
+ } else if NOTES_WARN
707
+ . iter ( )
708
+ . any ( |it| name_or_path. to_lowercase ( ) . contains ( it) )
709
+ {
710
+ let cstr = format ! (
711
+ "{}" ,
712
+ name_or_path
713
+ . on_truecolor( 226 , 120 , 120 )
714
+ . truecolor( 30 , 33 , 50 )
715
+ ) ;
716
+ name. push_str ( & cstr) ;
669
717
} else if EXECUTABLE . iter ( ) . any ( |it| & file_extension == it) {
670
718
let cstr = format ! ( "{}" , name_or_path. bold( ) . truecolor( 226 , 120 , 120 ) ) ;
671
719
name. push_str ( & cstr) ;
0 commit comments