GNU bug report logs - #19605
quotes: cp: use ASCII single-quotes in "cp -v"

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Thu, 15 Jan 2015 11:51:01 UTC

Severity: wishlist

Full log


Message #14 received at 19605 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 19605 <at> debbugs.gnu.org
Subject: Re: bug#19605: cp -v vs LC_ALL vs. quote marks
Date: Thu, 15 Jan 2015 16:58:32 +0000
On 15/01/15 16:01, 積丹尼 Dan Jacobson wrote:
> I'm saying please don't force me to need LC_ALL=C to make the quotes
> U+0027 APOSTROPHE always.
> 
> Long ago there were no quotes.
> 
> Then somebody thought quotes looked pretty, so they added U+0027
> APOSTROPHE always.
> 
> Then somebody else thought `....' looks cooler than '....' and made it
> that way.

That _looked_ better on some old fonts/systems.

> Then somebody thought that might make more work when copy and pasting
> when sending that to the shell, and needing to fix it if three clicks
> got the quotes too, so made it back to U+0027 APOSTROPHE. Good.

Ah you mean double clicking to select the word?
Single quotes are generally excluded from that auto selection,
while ‘locale specific’ quotes can be included which _is_ awkward.

Now that's terminal dependent. I notice xterm is more restrictive
in what it auto selects and will exclude the locale quotes (and . too),
while gnome terminal will include the locale quotes.
That's just a bug in gnome terminal though, as it should
add common quoting chars to its delimiter list.

> Except they forget to fix it back for other locales.

As mentioned before, to have it independent of locales we could
use the "shell-always" quoting style for files.  Note that would have
the small caveat that the quotes would not be included in a double click.

A larger caveat is that it 'shell-always' quoting provides
no protection for the terminal from control chars in a file name.
You can test that out by creating variously named files and using:

  ls -1 --quoting='shell-always' --show-control-chars

Hmm, I wonder could we augment the shell quoting to
add the $'\001' and $'\n' escape formats, which would
both provide the protection and be generally cut and pasteable.

Pádraig.




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

Previous Next


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