]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/color-names: fix stupid bugs
authorKarel Zak <kzak@redhat.com>
Mon, 25 Aug 2025 10:05:01 +0000 (12:05 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 25 Aug 2025 10:05:01 +0000 (12:05 +0200)
- sort "white" -> "yellow"
- fix typo "lightgray,"

Fixes: https://github.com/util-linux/util-linux/issues/2863
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/color-names.c

index f7b1946090907578fd0718b0a13260f9925085da..88c4ef957747775ada6461e404bb2825b5435c4c 100644 (file)
@@ -43,7 +43,7 @@ const char *color_sequence_from_colorname(const char *str)
                { "halfbright", UL_COLOR_HALFBRIGHT      },
                { "lightblue",  UL_COLOR_BOLD_BLUE       },
                { "lightcyan",  UL_COLOR_BOLD_CYAN       },
-               { "lightgray,", UL_COLOR_GRAY            },
+               { "lightgray",  UL_COLOR_GRAY            },
                { "lightgreen", UL_COLOR_BOLD_GREEN      },
                { "lightmagenta", UL_COLOR_BOLD_MAGENTA  },
                { "lightred",   UL_COLOR_BOLD_RED        },
@@ -51,8 +51,8 @@ const char *color_sequence_from_colorname(const char *str)
                { "red",        UL_COLOR_RED             },
                { "reset",      UL_COLOR_RESET,          },
                { "reverse",    UL_COLOR_REVERSE         },
-               { "yellow",     UL_COLOR_BOLD_YELLOW     },
-               { "white",      UL_COLOR_WHITE           }
+               { "white",      UL_COLOR_WHITE           },
+               { "yellow",     UL_COLOR_BOLD_YELLOW     }
        };
        struct ul_color_name key = { .name = str }, *res;