David Kastrup [off-list ref] writes:
Sure. What about the git-rebase line using $(($end - $msgnum)) ?
That's even more risque than ##.
Is it really risque? I do not think we have heard trouble with
the arith expansion from anybody. A few mistakes in the past
made that said things like:
$((end - 1)) ;# wrong... say "$end" if you mean variable
$((cd ...; pwd)) ;# wrong... say $( (...)) if command substitution
# that involves subshell
but I think we fixed them.
Understood. But using ${...#...} and ${...:+...} does not exactly
seem to be news in the git code base. Even though we have the claim
that Solaris' sh won't deal with the former.
I do not think we have trouble with ${parameter#word}. Much
less with ${parameter+word}; it has been in /bin/sh forever.