summaryrefslogtreecommitdiffstats
path: root/usr.bin/env/env.c
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>1999-08-27 08:59:32 +0000
committersheldonh <sheldonh@FreeBSD.org>1999-08-27 08:59:32 +0000
commit0e8ead5c97714e6cbc0565d9bdd85a762a86b791 (patch)
tree73c29df5b5a73926cfeb32970f03fd876d270e77 /usr.bin/env/env.c
parent5fed2c0cfaaffe1d38a13d51a5dc16c761deb174 (diff)
downloadFreeBSD-src-0e8ead5c97714e6cbc0565d9bdd85a762a86b791.zip
FreeBSD-src-0e8ead5c97714e6cbc0565d9bdd85a762a86b791.tar.gz
Add ``-i'' option, which is the same as ``-''. The -i option is the
recommended option in the manpage, but the - option remains for backward compatibility and is documented as such. PR: 13363 Reported by: James Howard <howardjp@wam.umd.edu> Reviewed by: bde
Diffstat (limited to 'usr.bin/env/env.c')
-rw-r--r--usr.bin/env/env.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c
index a5083fb..42ec003 100644
--- a/usr.bin/env/env.c
+++ b/usr.bin/env/env.c
@@ -60,9 +60,10 @@ main(argc, argv)
char *cleanenv[1];
int ch;
- while ((ch = getopt(argc, argv, "-")) != -1)
+ while ((ch = getopt(argc, argv, "-i")) != -1)
switch(ch) {
case '-':
+ case 'i':
environ = cleanenv;
cleanenv[0] = NULL;
break;
@@ -85,6 +86,6 @@ static void
usage()
{
(void)fprintf(stderr,
- "usage: env [-] [name=value ...] [command]\n");
+ "usage: env [-] [-i] [name=value ...] [command]\n");
exit(1);
}
OpenPOWER on IntegriCloud