bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the `--color' option of `ls' shadows the shortcut evaluation scheme


From: Jim Meyering
Subject: Re: the `--color' option of `ls' shadows the shortcut evaluation scheme of `&&' and `||'
Date: Tue, 12 Feb 2008 21:28:01 +0100

Eric Blake <address@hidden> wrote:
> According to Jim Meyering on 2/12/2008 11:30 AM:
> |
> | Here's the result I'll push in a day or two:
>
> What about the corresponding patch to dircolors?

I haven't done that yet.
Would you like to do it?

FYI, this time, I'm adding a dist check to ensure the sets of 2-letter
codes in dircolors.c and ls.c are equal.  It'll look something like this:

dc=$(sed -n '/static.*ls_codes\[/,/};'/p src/dircolors.c \
  |sed -n '/^  *"/p'|tr , '\n'|sed 's/^  *//' \
  |sed -n 's/^"\(..\)"/\1/p'|sort -u)

ls=$(sed -n '/static.*indicator_name\[/,/};'/p src/ls.c \
  |sed -n '/^  *"/p'|tr , '\n'|sed 's/^  *//' \
  |sed -n 's/^"\(..\)"/\1/p'|sort -u)

test "$dc" = "$ls" || exit 1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]