I just discovered that in bash,[[ -d foo-* ]] returns false ($? set to 1) even if a directory named foo-bar exists while [ -d foo-* ] returns true ($? set to 0)
I have to admit that I was surprised as I expected both versions to return true.
What is the rational behind this differing outcome?
bashmanual about[[ ... ]]where it says "Word splitting and pathname expansion are not performed on the words between the[[and]]".