#coreutils #uutils #cross-platform #cli #utility

bin+lib uu_dircolors

dircolors ~ (uutils) display commands to set LS_COLORS

15 releases

0.0.17 Jan 21, 2023
0.0.16 Oct 12, 2022
0.0.15 Aug 20, 2022
0.0.14 May 22, 2022
0.0.1 May 31, 2020

#850 in Command line utilities

Download history 29/week @ 2022-11-26 33/week @ 2022-12-03 35/week @ 2022-12-10 37/week @ 2022-12-17 48/week @ 2022-12-24 32/week @ 2022-12-31 37/week @ 2023-01-07 31/week @ 2023-01-14 138/week @ 2023-01-21 78/week @ 2023-01-28 112/week @ 2023-02-04 207/week @ 2023-02-11 272/week @ 2023-02-18 563/week @ 2023-02-25 186/week @ 2023-03-04 187/week @ 2023-03-11

1,226 downloads per month

MIT license

385KB
8K SLoC

How to update the internal database

Create the test fixtures by writing the output of the GNU dircolors commands to the fixtures folder:

$ dircolors --print-database > /PATH_TO_COREUTILS/tests/fixtures/dircolors/internal.expected
$ dircolors --print-ls-colors > /PATH_TO_COREUTILS/tests/fixtures/dircolors/ls_colors.expected
$ dircolors -b > /PATH_TO_COREUTILS/tests/fixtures/dircolors/bash_def.expected
$ dircolors -c > /PATH_TO_COREUTILS/tests/fixtures/dircolors/csh_def.expected

Run the tests:

$ cargo test --features "dircolors" --no-default-features

Edit /PATH_TO_COREUTILS/src/uu/dircolors/src/colors.rs until the tests pass.

Dependencies

~1.3–6.5MB
~107K SLoC