GNU bug report logs - #25009
ls -b fails to escape '-' c-style (ls (GNU coreutils) 8.21)

Previous Next

Package: coreutils;

Reported by: Kay Parker <kayparker <at> mailite.com>

Date: Wed, 23 Nov 2016 23:07:01 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25009 in the body.
You can then email your comments to 25009 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#25009; Package coreutils. (Wed, 23 Nov 2016 23:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kay Parker <kayparker <at> mailite.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 23 Nov 2016 23:07:02 GMT) Full text and rfc822 format available.

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

From: Kay Parker 	  <kayparker <at> mailite.com>
To: bug-coreutils <at> gnu.org
Subject: ls -b fails to escape '-' c-style (ls (GNU coreutils) 8.21)
Date: Wed, 23 Nov 2016 15:02:53 -0800
ls -b  (ls (GNU coreutils) 8.21): fails to escape '-' 
1\ 2\ 3\ -\ 4\ -5\ 6
should be: 1\ 2\ 3\ \-\ 4\ \-5\ 6


-- 
  Kay Parker       
  kayparker <at> mailite.com

-- 
http://www.fastmail.com - Does exactly what it says on the tin





Added tag(s) notabug. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Wed, 23 Nov 2016 23:28:02 GMT) Full text and rfc822 format available.

Reply sent to Eric Blake <eblake <at> redhat.com>:
You have taken responsibility. (Wed, 23 Nov 2016 23:28:02 GMT) Full text and rfc822 format available.

Notification sent to Kay Parker <kayparker <at> mailite.com>:
bug acknowledged by developer. (Wed, 23 Nov 2016 23:28:02 GMT) Full text and rfc822 format available.

Message #12 received at 25009-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Kay Parker <kayparker <at> mailite.com>, 25009-done <at> debbugs.gnu.org
Subject: Re: bug#25009: ls -b fails to escape '-' c-style (ls (GNU coreutils)
 8.21)
Date: Wed, 23 Nov 2016 17:27:48 -0600
[Message part 1 (text/plain, inline)]
tag 25009 notabug
thanks

On 11/23/2016 05:02 PM, Kay Parker wrote:
> ls -b  (ls (GNU coreutils) 8.21): fails to escape '-' 
> 1\ 2\ 3\ -\ 4\ -5\ 6
> should be: 1\ 2\ 3\ \-\ 4\ \-5\ 6

Why? The documentation states:

  -b, --escape               print C-style escapes for nongraphic characters

but - looks like a graphical character to me, so it doesn't need an escape.

I don't see a problem here, so I'm marking this as not a bug; however,
feel free to followup with more details, such as better justification
for why - should be treated as a nongraphic character.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#25009; Package coreutils. (Wed, 23 Nov 2016 23:35:01 GMT) Full text and rfc822 format available.

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

From: Pádraig Brady <P <at> draigBrady.com>
To: 25009 <at> debbugs.gnu.org, eblake <at> redhat.com, kayparker <at> mailite.com
Subject: Re: bug#25009: ls -b fails to escape '-' c-style (ls (GNU coreutils)
 8.21)
Date: Wed, 23 Nov 2016 23:34:20 +0000
On 23/11/16 23:27, Eric Blake wrote:
> tag 25009 notabug
> thanks
> 
> On 11/23/2016 05:02 PM, Kay Parker wrote:
>> ls -b  (ls (GNU coreutils) 8.21): fails to escape '-' 
>> 1\ 2\ 3\ -\ 4\ -5\ 6
>> should be: 1\ 2\ 3\ \-\ 4\ \-5\ 6
> 
> Why? The documentation states:
> 
>   -b, --escape               print C-style escapes for nongraphic characters
> 
> but - looks like a graphical character to me, so it doesn't need an escape.
> 
> I don't see a problem here, so I'm marking this as not a bug; however,
> feel free to followup with more details, such as better justification
> for why - should be treated as a nongraphic character.

Note you may be expecting ls to quote the file name
so that it's subsequently usable as a parameter to a command.
In that case --quoting=shell is more appropriate.




Information forwarded to bug-coreutils <at> gnu.org:
bug#25009; Package coreutils. (Wed, 23 Nov 2016 23:38:01 GMT) Full text and rfc822 format available.

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

From: Pádraig Brady <P <at> draigBrady.com>
To: 25009 <at> debbugs.gnu.org, eblake <at> redhat.com, kayparker <at> mailite.com
Subject: Re: bug#25009: ls -b fails to escape '-' c-style (ls (GNU coreutils)
 8.21)
Date: Wed, 23 Nov 2016 23:37:59 +0000
On 23/11/16 23:34, Pádraig Brady wrote:
> On 23/11/16 23:27, Eric Blake wrote:
>> tag 25009 notabug
>> thanks
>>
>> On 11/23/2016 05:02 PM, Kay Parker wrote:
>>> ls -b  (ls (GNU coreutils) 8.21): fails to escape '-' 
>>> 1\ 2\ 3\ -\ 4\ -5\ 6
>>> should be: 1\ 2\ 3\ \-\ 4\ \-5\ 6
>>
>> Why? The documentation states:
>>
>>   -b, --escape               print C-style escapes for nongraphic characters
>>
>> but - looks like a graphical character to me, so it doesn't need an escape.
>>
>> I don't see a problem here, so I'm marking this as not a bug; however,
>> feel free to followup with more details, such as better justification
>> for why - should be treated as a nongraphic character.
> 
> Note you may be expecting ls to quote the file name
> so that it's subsequently usable as a parameter to a command.
> In that case --quoting=shell is more appropriate.

Actually 1\ -\ 2 is fine as a command parameter
(as the shell doesn't split it).
Sorry for the noise





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Dec 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 179 days ago.

Previous Next


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