diff options
author | jilles <jilles@FreeBSD.org> | 2011-06-18 23:43:28 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-06-18 23:43:28 +0000 |
commit | a380f591f1e9bc535b187c9602563f4fb3d543a1 (patch) | |
tree | 9492d00adc3d49f927097a6f025651324dbe9d3c /bin | |
parent | e68709579e3654df9d75d883f6676b64a5b49d1a (diff) | |
download | FreeBSD-src-a380f591f1e9bc535b187c9602563f4fb3d543a1.zip FreeBSD-src-a380f591f1e9bc535b187c9602563f4fb3d543a1.tar.gz |
sh: Add do-nothing -h option.
POSIX requires a -h option to sh and set, to locate and remember utilities
invoked by functions as they are defined. Given that this
locate-and-remember process is optional elsewhere, it seems safe enough to
make this option do nothing.
POSIX does not specify a long name for this option. Follow ksh in calling it
"trackall".
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/options.h | 4 | ||||
-rw-r--r-- | bin/sh/sh.1 | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bin/sh/options.h b/bin/sh/options.h index f3d3d3d..acc2a11 100644 --- a/bin/sh/options.h +++ b/bin/sh/options.h @@ -62,8 +62,9 @@ struct shparam { #define privileged optlist[15].val #define Tflag optlist[16].val #define Pflag optlist[17].val +#define hflag optlist[18].val -#define NOPTS 18 +#define NOPTS 19 struct optent { const char *name; @@ -91,6 +92,7 @@ struct optent optlist[NOPTS] = { { "privileged", 'p', 0 }, { "trapsasync", 'T', 0 }, { "physical", 'P', 0 }, + { "trackall", 'h', 0 }, }; #else extern struct optent optlist[NOPTS]; diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 82a71e9..e318216 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd June 17, 2011 +.Dd June 18, 2011 .Dt SH 1 .Os .Sh NAME @@ -241,6 +241,10 @@ tested, all commands of the function are considered to be tested as well. .It Fl f Li noglob Disable pathname expansion. +.It Fl h Li trackall +A do-nothing option for +.Tn POSIX +compliance. .It Fl I Li ignoreeof Ignore .Dv EOF Ap s |