+2007-04-07 Jim Meyering <jim@meyering.net>
+
+ Add a test for, and document, today's fix.
+ * NEWS: Mention today's ls --color fix.
+ * tests/ls-2/tests (sl-target): Add a test for today's fix.
+ * THANKS: Add Kirk Kelsey.
+
2007-04-07 Eric Blake <ebb9@byu.net>
Fix a bug in how the LS_COLORS ln=target attribute is handled.
ls -x DIR would sometimes output the wrong string in place of the
first entry. [introduced in coreutils-6.8]
+ ls --color, (with a custom LS_COLORS envvar value including the
+ ln=target attribute) would mistakenly output the string "target"
+ before the name of each symlink. [introduced in coreutils-6.0]
+
* Noteworthy changes in release 6.9 (2007-03-22) [stable]
Keith Thompson kst@cts.com
Ken Pizzini kenp@halcyon.com
Kevin Mudrick kmudrick@healthmarketscience.com
+Kirk Kelsey kirk.kelsey@0x4b.net
Kristin E Thomas kristint@us.ibm.com
Kjetil Torgrim Homme kjetilho@ifi.uio.no
Kristoffer Rose kris@diku.dk
#!/bin/sh
# -*- perl -*-
-# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
-# Software Foundation, Inc.
+# Copyright (C) 1998, 2000-2007 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
my $rmdir2 = {POST => sub {rmdir 'd/e' or die "d/e: $!\n";
rmdir 'd' or die "d: $!\n" }};
+my $target = {PRE => sub {
+ mkdir 'd',0755 or die "d: $!\n";
+ symlink '.', 'd/X' or die "d/X: $!\n";
+ $ENV{LS_COLORS}='ln=target'
+ }};
+my $target2 = {POST => sub {unlink 'd/X' or die "d/X: $!\n";
+ rmdir 'd' or die "d: $!\n" }};
my $slink_d = {PRE => sub {symlink '/', 'd' or die "d: $!\n";
$ENV{LS_COLORS}='ln=01;36:di=01;34:or=40;31;01'
}};
{OUT => "\e[0m\e[01;36md\e[0m\@\n\e[m"},
$slink_d, $unlink_d],
+ # Test for a bug fixed in coreutils-6.10.
+ ['sl-target', '--color=always d',
+ {OUT => "\e[0m\e[01;34mX\e[0m\n\e[m"}, $target, $target2],
+
# Test for a bug that was introduced in coreutils-4.5.4; fixed in 4.5.5.
# To demonstrate it, the file in question (with executable bit set)
# must not be a command line argument.