coreutils
[Top][All Lists]
Advanced

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

Re: Feature request: ls --hyperlink


From: Egmont Koblinger
Subject: Re: Feature request: ls --hyperlink
Date: Fri, 25 Aug 2017 22:01:11 +0200

Hi,

> Version 2 [...]
> ensures that URLs are aligned in padded output,

I'm not sure I like this change (the outer pair of single quotes no longer
belonging to the URL).

First, these single quotes are colored according to the file type. With
this change, coloring and URLizing became less consistent compared to each
other.

Second, there might be inner apostrophes as well, e.g. on encountering
unprintable (e.g. invalid UTF-8) bytes in the filename. These are not
nested apostrophes if I understand correctly, but similarly to bash's
syntax they are opening-closing alternatively, am I right? In which case
matching pairs aren't consistent if they're URLized or not.

Er... even worse... wait a sec...

I've created a file named latin1á.txt in Latin-1 environment and listed in
UTF-8. Without hyperlink I get

'latin1'$'\341''.txt'

which is plausible. However, with hyperlinks, I get

'latin1'$'\341''.txt''

that is, an extra apostrophe at the end, and an odd number of apostrophes
in total. And a correspondingly broken indentation of subsequent columns.
Seems like the hyperlink option erroneously adds an extra single quote.
(This is with your v2 patch, I haven't checked your v1 in this regard.)


cheers,
egmont


reply via email to

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