git: sh: Detect an error for ${#var<GARBAGE>}.

看板DFBSD_commit作者時間14年前 (2011/08/22 08:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit f41d807a0c7c535d8f66f0593fb6e95fa20f82d4 Author: Peter Avalos <pavalos@dragonflybsd.org> Date: Sat Jul 2 14:03:42 2011 -1000 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 Summary of changes: bin/sh/parser.c | 4 +++- tools/regression/bin/sh/errors/bad-parm-exp6.2 | 2 ++ .../bin/sh/errors/bad-parm-exp6.2.stderr | 1 + 3 files changed, 6 insertions(+), 1 deletions(-) create mode 100644 tools/regression/bin/sh/errors/bad-parm-exp6.2 create mode 100644 tools/regression/bin/sh/errors/bad-parm-exp6.2.stderr http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f41d807a0c7c535d8f66f0593fb6e95fa20f82d4 -- DragonFly BSD source repository
文章代碼(AID): #1EKPnCQv (DFBSD_commit)