summaryrefslogtreecommitdiffstats
path: root/color.c
diff options
context:
space:
mode:
Diffstat (limited to 'color.c')
-rw-r--r--color.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/color.c b/color.c
index 3f56b4f..4ff3ebd 100644
--- a/color.c
+++ b/color.c
@@ -40,6 +40,7 @@ struct colors {
const char *block;
const char *chardev;
const char *orphan;
+ const char *missing;
const char *socket;
const char *setuid;
const char *setgid;
@@ -130,7 +131,7 @@ struct colors *parse_colors(const char *ls_colors) {
if (strcmp(key, "di") == 0) {
colors->dir = value;
} else if (strcmp(key, "do") == 0) {
- colors->socket = value;
+ colors->door = value;
}
break;
@@ -152,6 +153,14 @@ struct colors *parse_colors(const char *ls_colors) {
}
break;
+ case 'm':
+ if (strcmp(key, "mh") == 0) {
+ colors->multi_hard = value;
+ } else if (strcmp(key, "mi") == 0) {
+ colors->missing = value;
+ }
+ break;
+
case 'n':
if (strcmp(key, "no") == 0) {
colors->normal = value;
@@ -230,6 +239,10 @@ static const char *file_color(const struct colors *colors, const char *filename,
color = colors->exec;
}
+ if (!color && sb->st_nlink > 1) {
+ color = colors->multi_hard;
+ }
+
if (!color) {
size_t namelen = strlen(filename);