From 0e8ead5c97714e6cbc0565d9bdd85a762a86b791 Mon Sep 17 00:00:00 2001 From: sheldonh Date: Fri, 27 Aug 1999 08:59:32 +0000 Subject: 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 Reviewed by: bde --- usr.bin/env/env.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/env/env.c') 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); } -- cgit v1.1