This question already has an answer here:
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?