GNU bug report logs - #24926
ls-quotes: ls output has been made ugly

Previous Next

Package: coreutils;

Reported by: Michael Schwager <mike <at> schwager.com>

Date: Fri, 11 Nov 2016 16:36:01 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Michael Schwager <mike <at> schwager.com>
Cc: 24926 <at> debbugs.gnu.org
Subject: bug#24926: ls output has been made ugly
Date: Sat, 12 Nov 2016 01:20:38 +0000
On 12/11/16 00:24, Paul Eggert wrote:
> Michael Schwager wrote:
>> please illustrate a real life problem
> 
> In general, file names can be chosen by an adversary. This is a real-life 
> problem for me, and for many other people (whether they know it or not).
> 
> Eric Blake's arguments for leaving things alone are cogent ones.
> 
> You can try to track down the design discussion by doing a git blame and looking 
> for something on the mailing list around the time the changes were installed.
> 
> Also, this may not be obvious, but you can avoid the ugliest part of the quoting 
> by using the proper English-language character in your song titles. For example:
> 
> $ ls
> Groovin’  'Higher Ground'  UB40
> 
> This works because ’ (U+2019 RIGHT SINGLE QUOTATION MARK), the ordinary 
> character to use in the English-language title “Groovin’”, is not subject to the 
> off-putting replacement by '\'' (also, this character avoids other problems when 
> cutting and pasting into the shell). This would be better than what you have 
> now. Perhaps a suggestion along these lines should be put into the coreutils manual?

Note v8.26 will simplify the quoting when just traditional single quotes are present
by using double quotes like: "Groovin'"

BTW \u2019 might not be the best choice, as I tweeted recently
(with corresponding quotes in each example):

  It's awkward for file names to use shell quote
  It’s awkward for word regex to use right quote
  Itʼs best to use apostrophe modifier (\u02BC)

cheers,
Pádraig.




This bug report was last modified 6 years and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.