GNU bug report logs - #34475
doc: test: expand on -a/-o usage

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Thu, 14 Feb 2019 03:38:02 UTC

Severity: wishlist

To reply to this bug, email your comments to 34475 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#34475; Package coreutils. (Thu, 14 Feb 2019 03:38:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 14 Feb 2019 03:38:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-coreutils <at> gnu.org
Subject: Mention even more worries for test -a
Date: Thu, 14 Feb 2019 09:00:05 +0800
First, on the test(1) man page, at


       EXPRESSION1 -a EXPRESSION2
              both EXPRESSION1 and EXPRESSION2 are true

       EXPRESSION1 -o EXPRESSION2
              either EXPRESSION1 or EXPRESSION2 is true


Say instead

       EXPRESSION1 -a EXPRESSION2
              both EXPRESSION1 and EXPRESSION2 are true (See warning NOTE below.)

       EXPRESSION1 -o EXPRESSION2
              either EXPRESSION1 or EXPRESSION2 is true (See warning NOTE below.)

else users who never make it down to the "fine print at bottom" will
blithefully use them a lifetime without ever an inkling of the dangers!

(Indeed on (info "(coreutils) Connectives for test")
you discuss the dangers first, before even letting the users eyeballs
touch the syntax!)

Also on both man and info pages you need to warn of portability worries,
e.g., in bash we see -a and -o do even more things.

$ help test|egrep -- ' -(a|o) '
      -a FILE        True if file exists.
      -o OPTION      True if the shell option OPTION is enabled.
      EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.
      EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.




Information forwarded to bug-coreutils <at> gnu.org:
bug#34475; Package coreutils. (Fri, 15 Feb 2019 14:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 34475 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 34475 <at> debbugs.gnu.org
Subject: Re: bug#34475: Mention even more worries for test -a
Date: Fri, 15 Feb 2019 07:56:57 -0700
severity 34475 wishlist
retitle 34475 doc: test: expand on -a/-o usage
stop

Hello,

On 2019-02-13 6:00 p.m., 積丹尼 Dan Jacobson wrote:
> First, on the test(1) man page, at
[...]> Say instead
[...]

I'm marking this as "wishlist" item, patches always welcomed.

-assaf





Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 15 Feb 2019 14:58:02 GMT) Full text and rfc822 format available.

Changed bug title to 'doc: test: expand on -a/-o usage' from 'Mention even more worries for test -a' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 15 Feb 2019 14:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#34475; Package coreutils. (Fri, 15 Feb 2019 17:10:02 GMT) Full text and rfc822 format available.

Message #15 received at 34475 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: 34475 <at> debbugs.gnu.org
Subject: Re: bug#34475: Mention even more worries for test -a
Date: Sat, 16 Feb 2019 01:09:17 +0800
By the way
https://lists.gnu.org/archive/html/bug-bash/2019-02/msg00052.html
says "... contradictory description in the coreutils info document."




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

Previous Next


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