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