So does anyone here happen to know how quoting is
supposed to affect history expansion inside command substitution? That is, when is
!
supposed to have special meaning inside
$(
)
or
`
`
, and when isn't it? This relates to
a somewhat off-topic aside in the Downboat room. In Bash on 16.04 (Bash 4.3),
!
doesn't attempt history expansion in
echo $(echo '!')
but
does in
echo "$(echo '!')"
.