GNU bug report logs - #16730
ls -dF double trailing slash bug

Previous Next

Package: coreutils;

Reported by: Radko Dinev <radko.dinev <at> gmail.com>

Date: Wed, 12 Feb 2014 16:41:01 UTC

Severity: normal

Tags: notabug

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

Bug is archived. No further changes may be made.

Full log


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

From: Eric Blake <eblake <at> redhat.com>
To: 16730 <at> debbugs.gnu.org, radko.dinev <at> gmail.com
Subject: Re: bug#16730: ls -dF double trailing slash bug
Date: Wed, 12 Feb 2014 09:58:55 -0700
[Message part 1 (text/plain, inline)]
On 02/12/2014 09:52 AM, Eric Blake wrote:

> ls -F is merely appending the indicator on the end of the name as you
> typed it in, even if it results in what looks like a double indicator.
> 
> Where it gets interesting is on systems where / and // are distinct, but
> for consistency, we still do:
> 
> $ \ls -Fd / //
> //  ///

Further note that if you add --color, you can see the difference:

$ ls -Fd --color=always / // | od -tc
0000000 033   [   0   m 033   [   3   8   ;   5   ;   2   7   m   / 033
0000020   [   0   m   /  \n 033   [   3   8   ;   5   ;   2   7   m   /
0000040   / 033   [   0   m   /  \n
0000047

The file name you typed is colored, while the trailing / indicator added
by -F is not colored.

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

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

This bug report was last modified 11 years and 159 days ago.

Previous Next


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