From: Eric Blake Date: Fri, 4 Mar 2016 16:47:33 +0000 (-0700) Subject: test: Document that -a and -o are undesirable X-Git-Tag: v8.26~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6475c514550bc1fbdb3410485312211726765798;p=thirdparty%2Fcoreutils.git test: Document that -a and -o are undesirable POSIX recommends avoiding -a and -o, for good reason. src/test.c (usage): Mention that inherent ambiguities exist with binary -a and -o. Problem reported by Martin Gebert in: http://bugs.gnu.org/22909 --- diff --git a/src/test.c b/src/test.c index 36817d24e5..8ac7467f1b 100644 --- a/src/test.c +++ b/src/test.c @@ -790,6 +790,11 @@ INTEGER may also be -l STRING, which evaluates to the length of STRING.\n\ "), stdout); fputs (_("\ \n\ +NOTE: Binary -a and -o are inherently ambiguous. Use 'test EXPR1 && test\n\ +EXPR2' or 'test EXPR1 || test EXPR2' instead.\n\ +"), stdout); + fputs (_("\ +\n\ NOTE: [ honors the --help and --version options, but test does not.\n\ test treats each of those as it treats any other nonempty STRING.\n\ "), stdout);