1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

dircolors: fix comments

This commit is contained in:
Sylvestre Ledru 2023-12-04 22:47:42 +01:00
parent dabbcff9fb
commit 3e35410907

View file

@ -3,16 +3,13 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
// cSpell:disable
use once_cell::sync::Lazy;
/* The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
* slackware version of dircolors) are recognized but ignored.
* Global config options can be specified before TERM or COLORTERM entries
* below are TERM or COLORTERM entries, which can be glob patterns, which
* restrict following config to systems with matching environment variables.
*/
pub static TERMS: Lazy<Vec<&str>> = Lazy::new(|| {
vec![
/// The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
/// slackware version of dircolors) are recognized but ignored.
/// Global config options can be specified before TERM or COLORTERM entries
/// below are TERM or COLORTERM entries, which can be glob patterns, which
/// restrict following config to systems with matching environment variables.
pub static TERMS: &[&str] = &[
"Eterm",
"ansi",
"*color*",
@ -38,25 +35,21 @@ pub static TERMS: Lazy<Vec<&str>> = Lazy::new(|| {
"tmux*",
"vt100",
"xterm*",
]
});
];
/*
# Below are the color init strings for the basic file types.
# One can use codes for 256 or more colors supported by modern terminals.
# The default color codes use the capabilities of an 8 color terminal
# with some additional attributes as per the following codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
*/
pub static FILE_TYPES: Lazy<Vec<(&'static str, &'static str, &'static str)>> = Lazy::new(|| {
vec![
/// Below are the color init strings for the basic file types.
/// One can use codes for 256 or more colors supported by modern terminals.
/// The default color codes use the capabilities of an 8 color terminal
/// with some additional attributes as per the following codes:
/// Attribute codes:
/// 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
/// Text color codes:
/// 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
/// Background color codes:
/// 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
/// #NORMAL 00 /// no color code at all
/// #FILE 00 /// regular file: use no color at all
pub static FILE_TYPES: &[(&str, &str, &str)] = &[
("RESET", "rs", "0"), // reset to "normal" color
("DIR", "di", "01;34"), // directory
("LINK", "ln", "01;36"), // symbolic link
@ -75,16 +68,14 @@ pub static FILE_TYPES: Lazy<Vec<(&'static str, &'static str, &'static str)>> = L
("OTHER_WRITABLE", "ow", "34;42"), // dir that is other-writable (o+w) and not sticky
("STICKY", "st", "37;44"), // dir with the sticky bit set (+t) and not other-writable
("EXEC", "ex", "01;32"), // files with execute permission
]
});
];
/// Colors for file types
///
/// List any file extensions like '.gz' or '.tar' that you would like ls
/// to color below. Put the extension, a space, and the color init string.
/// (and any comments you want to add after a '#')
pub static FILE_COLORS: Lazy<Vec<(&str, &str)>> = Lazy::new(|| {
vec![
pub static FILE_COLORS: &[(&str, &str)] = &[
/*
// Executables (Windows)
(".cmd", "01;32"),
@ -230,11 +221,9 @@ pub static FILE_COLORS: Lazy<Vec<(&str, &str)>> = Lazy::new(|| {
(".rpmnew", "00;90"),
(".rpmorig", "00;90"),
(".rpmsave", "00;90"),
]
});
];
pub static FILE_ATTRIBUTE_CODES: Lazy<Vec<(&str, &str)>> = Lazy::new(|| {
vec![
pub static FILE_ATTRIBUTE_CODES: &[(&str, &str)] = &[
("normal", "no"),
("norm", "no"),
("file", "fi"),
@ -272,5 +261,4 @@ pub static FILE_ATTRIBUTE_CODES: Lazy<Vec<(&str, &str)>> = Lazy::new(|| {
("capability", "ca"),
("multihardlink", "mh"),
("clrtoeol", "cl"),
]
});
];