Date: Sun, 24 Feb 2002 21:35:55 -0800 From: Doug Barton <DougB@DougBarton.net> To: freebsd-current@freebsd.org, joe@freebsd.org Subject: LSCOLORS warning is silly Message-ID: <3C79CD3B.E315DF4B@DougBarton.net>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------DFCA465D07C4E73ED02FCE90 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit A couple months ago an improvement was added to the color support of ls to use a wider variety of colors, indicated by alphabet characters instead of numbers. While I think this is a good change, it included a warning when users have the old style numeric flags in their LSCOLORS variable. I think this is a mistake, and needlessly places another barrier for users coming into -current. Since the support for the old style color flags is practically free, I'd like to suggest that rather than warning the user, we simply continue to support the old flags, and indicate that they are deprecated in the man page. I'd like to commit the attached patch. Let me know what you think. -- "We have known freedom's price. We have shown freedom's power. And in this great conflict, ... we will see freedom's victory." - George W. Bush, President of the United States State of the Union, January 28, 2002 Do YOU Yahoo!? --------------DFCA465D07C4E73ED02FCE90 Content-Type: text/plain; charset=us-ascii; name="ls.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ls.diff" ? ls.1.gz Index: ls.1 =================================================================== RCS file: /home/ncvs/src/bin/ls/ls.1,v retrieving revision 1.62 diff -u -r1.62 ls.1 --- ls.1 9 Jan 2002 13:29:39 -0000 1.62 +++ ls.1 25 Feb 2002 05:24:12 -0000 @@ -496,6 +496,8 @@ is the foreground color and .Ar b is the background color. +The old style of numbers as color designators are still supported, +although deprecated. .Pp The color designators are as follows: .Pp Index: print.c =================================================================== RCS file: /home/ncvs/src/bin/ls/print.c,v retrieving revision 1.53 diff -u -r1.53 print.c --- print.c 25 Feb 2002 01:36:59 -0000 1.53 +++ print.c 25 Feb 2002 05:24:13 -0000 @@ -481,7 +481,6 @@ int j; int len; char c[2]; - short legacy_warn = 0; if (cs == NULL) cs = ""; /* LSCOLORS not set */ @@ -500,13 +499,6 @@ /* Legacy colours used 0-7 */ if (c[j] >= '0' && c[j] <= '7') { colors[i].num[j] = c[j] - '0'; - if (!legacy_warn) { - fprintf(stderr, - "warn: LSCOLORS should use " - "characters a-h instead of 0-9 (" - "see the manual page)\n"); - } - legacy_warn = 1; } else if (c[j] >= 'a' && c[j] <= 'h') colors[i].num[j] = c[j] - 'a'; else if (c[j] >= 'A' && c[j] <= 'H') { --------------DFCA465D07C4E73ED02FCE90-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C79CD3B.E315DF4B>