Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: env: -u name
To:
Klemens Nanni <kn@openbsd.org>
Cc:
tech@openbsd.org
Date:
Sun, 28 Jul 2024 23:18:39 +0200

Download raw body.

Thread
> Feedback? Objection? OK?

> -	while ((ch = getopt(argc, argv, "i-")) != -1)
> +	while ((ch = getopt(argc, argv, "-iu:")) != -1)

Having - in the first position of opstring is special. This breaks
setting environment variables.

$ env FOO=foo
usage: env [-i] [-u name] [name=value ...] [utility [argument ...]]

Could someone please revert or fix this?