From owner-freebsd-hackers Sat Jun 2 9:18:53 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from phaidor.thuvia.org (thuvia.demon.co.uk [193.237.34.248]) by hub.freebsd.org (Postfix) with ESMTP id 2418437B423 for ; Sat, 2 Jun 2001 09:18:46 -0700 (PDT) (envelope-from mark@thuvia.demon.co.uk) Received: from dotar-sojat.thuvia.org (dotar-sojat.thuvia.org [10.0.0.4]) by phaidor.thuvia.org (8.11.3/8.11.3) with ESMTP id f52GIhe12945; Sat, 2 Jun 2001 17:18:43 +0100 (BST) (envelope-from mark@dotar-sojat.thuvia.org) Received: (from mark@localhost) by dotar-sojat.thuvia.org (8.11.3/8.11.3) id f52GIjd35540; Sat, 2 Jun 2001 17:18:45 +0100 (BST) (envelope-from mark) Date: Sat, 2 Jun 2001 17:18:45 +0100 (BST) From: Mark Valentine Message-Id: <200106021618.f52GIjd35540@dotar-sojat.thuvia.org> In-Reply-To: Peter Seebach's message of Jun 2, 3:26am X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: seebs@plethora.net (Peter Seebach), hackers@freebsd.org Subject: Re: Fixing documented bug in env(1) 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 > From: seebs@plethora.net (Peter Seebach) > Date: Sat 2 Jun, 2001 > Subject: Re: Fixing documented bug in env(1) > 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). Cheers, Mark. -- Mark Valentine, Thuvia Labs "Tigers will do ANYTHING for a tuna fish sandwich." Mark Valentine uses "We're kind of stupid that way." *munch* *munch* and endorses FreeBSD -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message