1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 20:47:46 +00:00

simplify the declaration

Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
This commit is contained in:
Sylvestre Ledru 2023-12-06 21:15:43 +01:00 committed by GitHub
parent 97ec99cf28
commit bd667efa7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -497,18 +497,22 @@ pub fn generate_dircolors_config() -> String {
config.push_str(&format!("TERM {}\n", term)); config.push_str(&format!("TERM {}\n", term));
} }
config.push_str("# Below are the color init strings for the basic file types.\n"); config.push_str(
config.push_str("# One can use codes for 256 or more colors supported by modern terminals.\n"); "\
config.push_str("# The default color codes use the capabilities of an 8 color terminal\n"); # Below are the color init strings for the basic file types.\n\
config.push_str("# with some additional attributes as per the following codes:\n"); # One can use codes for 256 or more colors supported by modern terminals.\n\
config.push_str("# Attribute codes:\n"); # The default color codes use the capabilities of an 8 color terminal\n\
config.push_str("# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed\n"); # with some additional attributes as per the following codes:\n\
config.push_str("# Text color codes:\n"); # Attribute codes:\n\
config.push_str("# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white\n"); # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed\n\
config.push_str("# Background color codes:\n"); # Text color codes:\n\
config.push_str("# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white\n"); # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white\n\
config.push_str("#NORMAL 00 # no color code at all\n"); # Background color codes:\n\
config.push_str("#FILE 00 # regular file: use no color at all\n"); # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white\n\
#NORMAL 00 # no color code at all\n\
#FILE 00 # regular file: use no color at all\n\
",
);
for (name, _, code) in FILE_TYPES { for (name, _, code) in FILE_TYPES {
config.push_str(&format!("{} {}\n", name, code)); config.push_str(&format!("{} {}\n", name, code));