GNU bug report logs - #33097
test has filetest -a but man page doesn't list it

Previous Next

Package: coreutils;

Reported by: Martin Schulte <gnu <at> schrader-schulte.de>

Date: Fri, 19 Oct 2018 21:00:02 UTC

Severity: normal

Tags: confirmed, fixed

Merged with 15278

Done: Bernhard Voelker <mail <at> bernhard-voelker.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Assaf Gordon <assafgordon <at> gmail.com>, Martin Schulte <gnu <at> schrader-schulte.de>, 33097 <at> debbugs.gnu.org
Subject: bug#33097: test has filetest -a but man page doesn't list it
Date: Mon, 22 Oct 2018 08:15:55 +0200
Hi Assaf,

On 10/20/18 1:09 AM, Assaf Gordon wrote:
> Hi Bernhard,
> 
> On 19/10/18 04:56 PM, Bernhard Voelker wrote:
>> On 10/19/18 10:48 PM, Martin Schulte wrote:
>>
>> The '-a FILE' primary is supported since "the beginning", and even the
>> POSIX spec mentions this unlucky thing:
> [...]
>> I don't think we can remove that primary without breaking some scripts,
>> so it's probably best to document it.
>> The attached, proposed patch add documentation both in the man and
>> texinfo format.
>>
>> Comments?
>>
> 
> I just noticed this old bug:
> https://bugs.gnu.org/15278
> 
> Where Eric notes that coreutils' unary -a is incorrect under some very 
> specific circumstances - perhaps it's worth mentioning that as well
> (unless someone wants to fix it, though it's been 5 years...)

thanks for mentioning.  Now, this bug would go away with the proposed
patch #1 in [1] to remove the -a unary operator.

FWIW: bash also has a 'test -o SHELLOPT' unary operator to test whether
the given SHELLOPT is enabled in the current shell (see 'set -o SHELLOPT').
GNU test also had this -o unary (until patch #2 in [1]), but this never
worked well because it ran into an error later on because it ran into
thee default case and therefore didn't call 'unary_advance'.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33097#23

Have a nice day,
Berny




This bug report was last modified 6 years and 266 days ago.

Previous Next


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