https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206295

Jilles Tjoelker <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Jilles Tjoelker <[email protected]> ---
(In reply to nibbana from comment #0)
This may not make much sense, but per a literal reading of the 'test' page in
POSIX.1-2008 XCU, the -a or -o indeed binds more strongly than the !. This is
because -a and -o are explicitly said to be "binary primaries" and therefore ''
-a '' matches the first case of 3 arguments and ! '' -a '' matches the first
case of 4 arguments.

In bash, dash, zsh and yash, [ ! "" -a "" ] likewise returns true.

I recommend writing [ ! "" ] && [ "" ] or [ -z "" ] && [ -n "" ] instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to