bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Matt Martini <matt.martini@imaginarywave.com>
To: 33123@debbugs.gnu.org
Cc: kaxandra.labat@gmail.com
Subject: bug#33123: non-backwards compatible change to ls
Date: Mon, 22 Oct 2018 23:42:54 -0400	[thread overview]
Message-ID: <C020852A-FC79-42A9-A388-14FA5E0B59EB@gmail.com> (raw)

There was a change in the behavior of ls that is unconditional (no
way to revert to the old behavior) and incompatible with the
previous behavior.

The change is listed in the Changelog for 8.30:

2018-06-20  Kaxandra Labat  <kaxandra.labat@gmail.com>
 ls: ignore case when coloring file extensions
   * src/ls.c (get_color_indicator): s/STREQ_LEN/c_strncasecmp/
   * src/dircolors.hin: Remove a now redundant entry.
   * tests/ls/color-ext.sh: Add a new test.
   * tests/local.mk: Reference the new test.
   * NEWS: Mention the change in behavior.

This breaks the use case where different colors are assigned to suffixes
whose case is different. The old behavior allowed for making visually
distinct different cased suffixes.

For example:

    image.jpg    could be rendered in green
    image.JPG    could be rendered in green with a yellow background 

This would allow for easy identification of non-uniform cases,
especially in directories with large numbers of files.

What I am requesting is a way to get the old behavior back. 

One suggestion would be adding a setting to the —color option, whereby

    --color=auto				would turn on colorization case-insensitive (as the new behavior works)
    --color=auto-case		would turn on colorization case-sensitive (as the old behavior worked)

Thank you.

Matt

             reply	other threads:[~2018-10-23  3:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23  3:42 Matt Martini [this message]
2022-05-10  8:45 ` bug#33123: ls: add case-sensitive --color option Mikael Magnusson
2022-05-10 14:21   ` Pádraig Brady
2022-09-04 19:23     ` bug#33123: [PATCH] ls: --color: honor separate sequences for extension cases Pádraig Brady
2023-01-28 19:31 ` bug#33123: ls: add case-sensitive --color option Matt Martini
2023-01-28 20:24   ` Pádraig Brady
2023-03-13 15:30     ` Pádraig Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C020852A-FC79-42A9-A388-14FA5E0B59EB@gmail.com \
    --to=matt.martini@imaginarywave.com \
    --cc=33123@debbugs.gnu.org \
    --cc=kaxandra.labat@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).