coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] test: Add unary operator -E: test that a file is an empty di


From: Eric Blake
Subject: Re: [PATCH] test: Add unary operator -E: test that a file is an empty directory
Date: Wed, 6 Apr 2016 11:58:11 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

On 04/06/2016 11:09 AM, address@hidden wrote:
> From: Mattias Andrée <address@hidden>
> 
> ---
>  doc/coreutils.texi |  7 ++++++-
>  src/test.c         | 44 +++++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 49 insertions(+), 2 deletions(-)


Thanks for the patch, and remembering to document it.  However, it also
needs a NEWS entry and testsuite coverage; by the time you do that, the
patch may be non-trivial enough to need copyright assignment.

Also, the bar for adding new options to 'test' is very high - is there
any other existing practice (say in bash, ksh, zsh, BSD, or elsewhere)
that is already using -E, and if so, are they using it for the same
purpose?  If so, mention it and this patch is worthwhile; if not, I'm a
bit reluctant to be the first inventor, especially if something else
more portable can be used.

On the other hand, I readily concur that "test -s directory" does NOT
accurately report whether the directory has contents, so maybe adding
the new operator has justification on that grounds; it would also be
nice if you could simultaneously propose it on the bash mailing list, so
that multiple GNU programs implement the same semantics at once.

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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