summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/expand.c11
-rw-r--r--bin/sh/sh.11
2 files changed, 11 insertions, 1 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index f6a0a09..46214b9 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -657,6 +657,17 @@ again: /* jump here after setting a variable with ${var=text} */
}
varlen = 0;
startloc = expdest - stackblock();
+ if (!set && uflag) {
+ switch (subtype) {
+ case VSNORMAL:
+ case VSTRIMLEFT:
+ case VSTRIMLEFTMAX:
+ case VSTRIMRIGHT:
+ case VSTRIMRIGHTMAX:
+ case VSLENGTH:
+ error("%.*s: parameter not set", p - var - 1, var);
+ }
+ }
if (set && subtype != VSPLUS) {
/* insert the value of the variable */
if (special) {
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index e9f5f08..54e4465 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -264,7 +264,6 @@ sh -T -c "trap 'exit 1' 2 ; some-blocking-program"
Write a message to standard error when attempting
to expand a variable that is not set, and if the
shell is not interactive, exit immediately.
-(UNIMPLEMENTED)
.It Fl V Li vi
Enable the builtin
.Xr vi 1
OpenPOWER on IntegriCloud