From owner-freebsd-hackers Sun Jun 3 15:19:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id AA92237B401 for ; Sun, 3 Jun 2001 15:19:41 -0700 (PDT) (envelope-from obrien@nuxi.ucdavis.edu) Received: from dragon.nuxi.com (root@trang.muxi.com [206.40.252.115] (may be forged)) by relay.nuxi.com (8.11.2/8.11.2) with ESMTP id f53MJel89742; Sun, 3 Jun 2001 15:19:40 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.3/8.11.1) id f53MJdm30672; Sun, 3 Jun 2001 15:19:39 -0700 (PDT) (envelope-from obrien) Date: Sun, 3 Jun 2001 15:19:39 -0700 From: "David O'Brien" To: Mark Valentine Cc: Peter Seebach , hackers@freebsd.org Subject: Re: Fixing documented bug in env(1) Message-ID: <20010603151939.B30607@dragon.nuxi.com> Reply-To: obrien@freebsd.org References: <200106021618.f52GIjd35540@dotar-sojat.thuvia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200106021618.f52GIjd35540@dotar-sojat.thuvia.org>; from mark@thuvia.demon.co.uk on Sat, Jun 02, 2001 at 05:18:45PM +0100 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mark you've given the justification and logic behind `==' much, much better than I did. Thanks! :-) -- -- David (obrien@FreeBSD.org) P.S. typically I don't quote a whole message like this, but I think it is important that at least read this one and honestly consider it. On Sat, Jun 02, 2001 at 05:18:45PM +0100, Mark Valentine wrote: > > people use -- > > to end subsequences of arguments all the time. > > No, they use ``--'' to indicate to getopt(3) the end of the _options_ and > the _start_ of the arguments. > > Since env(1) uses getopt(3), ``--'' already has meaning to env(1); it allows > environment variables and commands which start with ``-'' (the former is > obviously invalid). > > $ env -i -- -t args > > currently allows execution of command ``-t''. > > However, what Dima proposes doesn't seem to be harmful, just slightly > confusing, and less surprising than inventing a new delimieter such as > ``==''. > > $ env -i -- foo=bar -- 4=4 args > > has two distinct uses of `--'' as per Dima's proposal, the first tells > getopt(3) to stop processing options, and the second tells the argument > processing code to stop looking for variable assignments (i.e. ``4=4'' > is a command). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message