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