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: Pádraig Brady
Subject: Re: [PATCH] ls: do not print directory indicator for root
Date: Sun, 12 May 2013 22:58:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 05/12/2013 09:40 PM, Sami Kerola wrote:
> diff --git a/tests/ls/root-slash.sh b/tests/ls/root-slash.sh
> new file mode 100755
> index 0000000..6646322
> --- /dev/null
> +++ b/tests/ls/root-slash.sh

> +LC_MESSAGES=C ls -pd / > out || fail=1
> +LC_MESSAGES=C ls -Fd / >> out || fail=1

Note tests don't need to set locales to C
as that's done at a global level.

Thanks for the patch,
however I still think it adds inconsistency for little gain.
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?

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//

Again color and context should avoid any ambiguity?

thanks,
Pádraig.



reply via email to

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