bug#22909: [PATCH] test: Document that -a and -o are undesirable
tags 22909 fixed close 22909 stop (triaging old bugs) On Fri, Mar 04, 2016 at 11:43:05AM -0700, Eric Blake wrote: > On 03/04/2016 10:51 AM, Jim Meyering wrote: > > On Fri, Mar 4, 2016 at 9:50 AM, Jim Meyering wrote: > >> On Fri, Mar 4, 2016 at 9:12 AM, Pádraig Brady wrote: > >>> On 04/03/16 08:55, Eric Blake wrote: > >> ... > +NOTE: Use of binary -a and -o create inherently ambiguous situations. > >> > > I like it; I'll push with that wording. > pushed here: https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=6475c514550bc1fbdb3410485312211726765798 So closing as "fixed". -assaf
bug#22909: [PATCH] test: Document that -a and -o are undesirable
On 03/04/2016 10:51 AM, Jim Meyering wrote: > On Fri, Mar 4, 2016 at 9:50 AM, Jim Meyeringwrote: >> On Fri, Mar 4, 2016 at 9:12 AM, Pádraig Brady wrote: >>> On 04/03/16 08:55, Eric Blake wrote: >> ... +NOTE: Use of binary -a and -o create inherently ambiguous situations. >> >> I like that, too. Thanks. One nit: s/create/creates/ > > Or perhaps better/shorter still: > > Binary -a and -o are inherently ambiguous. I like it; I'll push with that wording. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
bug#22909: [PATCH] test: Document that -a and -o are undesirable
On Fri, Mar 4, 2016 at 9:50 AM, Jim Meyeringwrote: > On Fri, Mar 4, 2016 at 9:12 AM, Pádraig Brady wrote: >> On 04/03/16 08:55, Eric Blake wrote: > ... >>> +NOTE: Use of binary -a and -o create inherently ambiguous situations. > > I like that, too. Thanks. One nit: s/create/creates/ Or perhaps better/shorter still: Binary -a and -o are inherently ambiguous.
bug#22909: [PATCH] test: Document that -a and -o are undesirable
On Fri, Mar 4, 2016 at 9:12 AM, Pádraig Bradywrote: > On 04/03/16 08:55, Eric Blake wrote: ... >> +NOTE: Use of binary -a and -o create inherently ambiguous situations. I like that, too. Thanks. One nit: s/create/creates/
bug#22909: [PATCH] test: Document that -a and -o are undesirable
On 04/03/16 08:55, Eric Blake wrote: 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 --- src/test.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/test.c b/src/test.c index 36817d2..bf31cf9 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: Use of binary -a and -o create inherently ambiguous situations. Use\n\ +'test EXPR1 && test 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); +1 thanks
bug#22909: [PATCH] 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 --- src/test.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/test.c b/src/test.c index 36817d2..bf31cf9 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: Use of binary -a and -o create inherently ambiguous situations. Use\n\ +'test EXPR1 && test 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); -- 2.5.0