bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point


From: Jim Meyering
Subject: Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point to
Date: Wed, 12 Aug 2009 09:21:42 +0200

Lennart Poettering wrote:
> [Second version of the patch, makes this feature optional with --fancy-chars]
>
> Diego Pettenò complained that "ls -l" doesn't use the UTF-8 arrow
> character to show where symlinks point to. This tiny patch fixes that.
> With this applied the character is used when the CODESET is UTF-8
> otherwise we fall back to the traditional "->" arrow.
>
> This is only enabled if --fancy-chars is passed as argument.
>
> Ah, "ls -l" is so much prettier now!
>
> For verification:
>
> http://pastie.org/573270

Thanks for the patch.
However, I'm inclined not to add the functionality even
via a separate option, because:

  - The bar for adding a new option to ls is very high;  you'd need
      more justification than "someone complained" or "it's prettier, now."

  - It's easy to get nearly the same effect with a simple filter,
      as Pádraig suggested.  (of course, a naive filter fails if
      a file name contains " -> ", but the end result is solely for
      human consumption, not for mechanical parsing, so that's ok)

Just by the way, I compared your arrow and the one Pádraig
used in his example:

    $ printf 'a -> b\n'
    a -> b
    $ printf 'a \xe2\x86\x92 b\n'
    a → b
    $ printf 'a \u25aa\u25b6 b\n'
    a ▪▶ b

I found the 1-column-wide arrow to be disconcertingly similar to
a hyphen, when viewed via a 7-point (admittedly small) font in
a gnome-terminal.  Compare to underscore and hyphen:

    $ printf 'a _\xe2\x86\x92- b\n'
    a _→- b

As usual, if you come up with more justification, or many people
clamor for this option, we will revisit the decision.




reply via email to

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