OpenBSD/src 5YFurUjbin/ksh expr.c eval.c

   When evaluating an arithmetical expression, for example inside $(()),
   never do substitution (neither parameter, nor command, nor arithmetic,
   nor tilde substitution) on the values of any variables encountered
   inside the expression, but do recursively perform arithmetical
   evaluation of subexpressions as required.  This makes behaviour
   more consistent, without hindering any behaviour promised in the
   manual page.

   A quirk originally reported by Andy Chu <andychup at gmail dot com>
   was that in the past, when encountering an array index, the shell
   would not only do evaluation, but also substitution on the array
   index, even though substitution would not be done on the expression
   in general.

   tobias@ contributed to initial efforts of understanding the quirk.
   patch tested in a bulk build by naddy@
   "please commit" deraadt@
VersionDeltaFile
1.34+6-1bin/ksh/expr.c
1.64+4-1bin/ksh/eval.c
1.97+2-1bin/ksh/main.c
1.75+2-1bin/ksh/sh.h
+14-44 files

UnifiedSplitRaw