coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] ls: do not print directory indicator for root


From: Sami Kerola
Subject: Re: [PATCH] ls: do not print directory indicator for root
Date: Mon, 13 May 2013 15:24:46 +0100

On 13 May 2013 00:24, Bob Proulx <address@hidden> wrote:
> Pádraig Brady wrote:
>> Thanks for the patch,
>> however I still think it adds inconsistency for little gain.
>
> Creating this inconsistency also feels wrong to me too.  It just
> doesn't seem right that everything else is implemented consistently
> but this one case is made special.  In effect making this case
> inconsistent with the others.
>
>> It was mentioned that a trailing / is confusing and could
>> be mistaken for a separate // root indicator.
>>
>> Though consider:
>>
>> $ /bin/ls -Fd --color //
>> ///
>>
>> That demonstrates the already possible ambiguity in root indicators.
>> More importantly though, the trailing / has a different color to that
>> of the specified path, which in the normal case should avoid ambiguity?
>
> Agreed.  Also consider this case: (With the color indicated for email.
> Probably better if you run the command yourself.)
>
>   $ env ls -Fdlog --color / /var /var/tmp
>   drwxr-xr-x 25  4096 May  8 23:29 <blue>/</blue>/
>   drwxr-xr-x 14  4096 Aug 29  2011 <blue>/var</blue>/
>   drwxrwxrwt  3 20480 May 12 16:04 <blue>/var/tmp</blue>/
>
> It doesn't seem right that it would ever display this way:
>
>   $ env ls -Fdlog --color / /var /var/tmp
>   drwxr-xr-x 25  4096 May  8 23:29 <blue>/</blue>
>   drwxr-xr-x 14  4096 Aug 29  2011 <blue>/var</blue>/
>   drwxrwxrwt  3 20480 May 12 16:04 <blue>/var/tmp</blue>/
>
> That just seems wrong to me.  Why would that one be different.
>
>> Also I'm not sure about treating root specially here.
>> This generally is when any directory is specified with trailing /
>>
>> $ /bin/ls -dF --color ~/
>> /home/padraig//
>
> Another good example.
>
>> Again color and context should avoid any ambiguity?
>
> I would say * consistency *, color and context.  With emphasis on
> consistency.

Hi Bob and Pádraig,

The --color consistency seems to be so good argument against approving
the patch that I cannot defend it.  IMHO it the change belongs to
rejected area with reference to this thread.

--
   Sami Kerola
   http://www.iki.fi/kerolasa/



reply via email to

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