sh: Detect an error for ${#var<GARBAGE>}.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 3 Jul 2011 00:03:42 +0000 (14:03 -1000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 21 Aug 2011 19:10:24 +0000 (12:10 -0700)
commitf41d807a0c7c535d8f66f0593fb6e95fa20f82d4
treec02735a050493c6a9752c661a92272a20e5e4c6b
parent5d4731c8351e78f0e4bf4cc5b6997b92110c3fbd
sh: Detect an error for ${#var<GARBAGE>}.

In particular, this makes things like ${#foo[0]} and ${#foo[@]} errors
rather than silent equivalents of ${#foo}.

Obtained-from:   FreeBSD SVN rev 221461
bin/sh/parser.c
tools/regression/bin/sh/errors/bad-parm-exp6.2 [new file with mode: 0644]
tools/regression/bin/sh/errors/bad-parm-exp6.2.stderr [new file with mode: 0644]