Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail From: Eric Blake Newsgroups: gnu.bash.bug Subject: Re: '[ --version' should give output, instead a bash error missing re: missing ']' Date: Tue, 22 Sep 2015 09:39:12 -0600 Organization: Red Hat, Inc. Lines: 55 Approved: bug-bash@gnu.org Message-ID: References: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1xW0EqH2BhutmqMsOOu3GOctGM25C2onh" X-Trace: usenet.stanford.edu 1442936368 8061 208.118.235.17 (22 Sep 2015 15:39:28 GMT) X-Complaints-To: action@cs.stanford.edu To: Daniel Simeone , bug-bash@gnu.org, bash@packages.debian.org Envelope-to: bug-bash@gnu.org Openpgp: url=http://people.redhat.com/eblake/eblake.gpg User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11543 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1xW0EqH2BhutmqMsOOu3GOctGM25C2onh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/22/2015 08:22 AM, Daniel Simeone wrote: >=20 > Description: > According to the joint man page for '[' and 'test', '[ --versio= n' > and '[ --help' should give appropriate output, while 'test' should not.= You're probably reading the coreutils man page, rather than the bash man page. Bash has not (yet) implemented support for ANY --options to its builtins, although there has been talk on the list of doing so for future versions (especially since ksh has already done it). If you are executing the shell builtins instead of the coreutils versions, then the behavior you see is expected and not a bug. To see the behavior mentioned in the coreutils man page, be sure you run the coreutils version of [, as in: env [ --help or /bin/[ --help --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --1xW0EqH2BhutmqMsOOu3GOctGM25C2onh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWAXYgAAoJEKeha0olJ0Nqs2IH/if9/PsgOBBYfENocCpdb8y4 ipfrbZNAzKnNc75eQnK3sL+6/iHeYFGfU2AndZn4JCWC4gTv2q+cs9jT1r9euv8U eoIhKI+mHqLzDnVdhn7oeNOdjl+VUdfJYNUTiRO0mH+CJQ5KlR42Dm2BKoHaMfAe /+ZxG2jcC/23d103zGbe8EhkrXFhNnPUWkY+WLY+8IKGQIA8VZ7RnX4HUEuPhZSp +dZldpLrhl0ufDR0pG93pYx7cAm1U9Hvm9u1aYxsUsuRhOkuH7LA/uGkaqlluDuu BFZ5Jf6cBhaIX2XKRhZG985iUNeIEGBezNnulmrt7jLidY0jARkaQ262wE2W/is= =5FCX -----END PGP SIGNATURE----- --1xW0EqH2BhutmqMsOOu3GOctGM25C2onh--