Bash Version: 4.2 Patch Level: 10 Release Status: release Description: printf "%q" "~" not escaped?
which means that this eval echo $(printf "%q" "~") results in your home path not a ~ unlike eval echo $(printf "%q" "*") as far as I can see its the only character that isn't treated as I expected.