diff options
author | Kamil Dudka <kdudka@redhat.com> | 2009-03-24 12:16:20 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-03-24 16:11:00 +0000 |
commit | 2827bb5704a153a0b4ac9c4af8b83ed015012f68 (patch) | |
tree | e22a1019643c9de53f2e20af99edc07ee1d47ebb /src/ls.c | |
parent | d1df6ef183a651c82b719c3eef6f81b899109a7e (diff) | |
download | coreutils-2827bb5704a153a0b4ac9c4af8b83ed015012f68.tar.xz |
ls: make it possible to disable coloring of hard links
* src/ls.c (print_color_indicator): Don't color hard links if disabled
(when there is an empty hl= in the LS_COLORS environment variable).
* tests/ls/hardlink: Add test case for disabled hard link highlighting.
* NEWS: Mention the change.
Diffstat (limited to 'src/ls.c')
-rw-r--r-- | src/ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4008,7 +4008,7 @@ print_color_indicator (const char *name, mode_t mode, int linkok, type = C_CAP; else if ((mode & S_IXUGO) != 0) type = C_EXEC; - else if (1 < nlink) + else if (is_colored (C_HARDLINK) && (1 < nlink)) type = C_HARDLINK; } else if (S_ISDIR (mode)) |