Maxdamantus writes: > This seems like a bug, but it seems to have been here for a few years > (from the git repository, bash-3.0 displays this behaviour while > bash-2.05b doesn't). > > With history expansion enabled (set +H): > > $ echo '!!' # good > !! > $ echo "$(echo '!!')" # not good; !! expands > echo "$(echo 'echo '!!'')" > echo !! > $ echo '$$' # good > $$ > $ echo "$(echo '$$')" # good > $$
I'm not totally sure why you think this is a bug. How can bash know what quoting style was used inside the command substitution? This is normal behaviour when history expansion is performed inside a double quoted block. Perhaps if you explained the reason you think this is a bug better, someone could give a more meaningful reply. :-)
pgpXYMPXVLkf3.pgp
Description: PGP signature
