aboutsummaryrefslogtreecommitdiffstats
path: root/ls-1-Allow-LSCOLORS-to-specify-an-underline.patch
diff options
context:
space:
mode:
Diffstat (limited to 'ls-1-Allow-LSCOLORS-to-specify-an-underline.patch')
-rw-r--r--ls-1-Allow-LSCOLORS-to-specify-an-underline.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/ls-1-Allow-LSCOLORS-to-specify-an-underline.patch b/ls-1-Allow-LSCOLORS-to-specify-an-underline.patch
index 095d6f3..e072094 100644
--- a/ls-1-Allow-LSCOLORS-to-specify-an-underline.patch
+++ b/ls-1-Allow-LSCOLORS-to-specify-an-underline.patch
@@ -1,4 +1,4 @@
-From f873a0a04c981fbcc7879bcefe355fbbfd1a8adb Mon Sep 17 00:00:00 2001
+From 62bedad5fc7607ffbf76ab1f45b0aebd4b424289 Mon Sep 17 00:00:00 2001
From: Cameron Katri <me@cameronkatri.com>
Date: Fri, 28 May 2021 17:56:48 -0400
Subject: [PATCH] ls(1): Allow LSCOLORS to specify an underline
@@ -72,10 +72,10 @@ index 8510ca609cd..ef412dd2927 100644
.Pp
Note that the above are standard
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
-index 338b3d1d2a2..67cb91fdcde 100644
+index 92575711251..8a30dd326b4 100644
--- a/bin/ls/ls.c
+++ b/bin/ls/ls.c
-@@ -161,6 +161,7 @@ char *ansi_fgcol; /* ANSI sequence to set foreground colour */
+@@ -159,6 +159,7 @@ char *ansi_fgcol; /* ANSI sequence to set foreground colour */
char *ansi_coloff; /* ANSI sequence to reset colours */
char *attrs_off; /* ANSI sequence to turn off attributes */
char *enter_bold; /* ANSI sequence to set color to bold mode */
@@ -92,7 +92,7 @@ index 338b3d1d2a2..67cb91fdcde 100644
/* To switch colours off use 'op' if
* available, otherwise use 'oc', or
diff --git a/bin/ls/print.c b/bin/ls/print.c
-index 9a537418f7b..da92668d5c5 100644
+index 9a537418f7b..d07b83ed830 100644
--- a/bin/ls/print.c
+++ b/bin/ls/print.c
@@ -107,6 +107,7 @@ static const char *defcolors = "exfxcxdxbxegedabagacad";
@@ -135,12 +135,12 @@ index 9a537418f7b..da92668d5c5 100644
colors[i].num[j] = c[j] - 'A';
- colors[i].bold = 1;
- } else if (tolower((unsigned char)c[j]) == 'x')
-+ if (j)
++ if (j == 1)
+ colors[i].underline = 1;
+ else
+ colors[i].bold = 1;
+ } else if (tolower((unsigned char)c[j]) == 'x') {
-+ if (j && c[j] == 'X')
++ if (j == 1 && c[j] == 'X')
+ colors[i].underline = 1;
colors[i].num[j] = -1;
+ }
@@ -148,5 +148,5 @@ index 9a537418f7b..da92668d5c5 100644
warnx("invalid character '%c' in LSCOLORS"
" env var", c[j]);
--
-2.31.1
+2.32.0