On 2013-09-01 12:45, Nikolai Kondrashov wrote: > 1) With both nullglob and failglob enabled it is considered an error for a > glob not to match anything. I'd say it's more natural to not produce an > error in this case. Otherwise a fairly useful behavior is broken, like > glob use in "for" loop:
Well... nullglob *and* failglob are pretty much at odds with each other. I'm not sure what you expect to happen. > Are globs supposed to have an effect in associative array initializers? If > yes, what effect, and should this be documented? If not, is it possible > that this is a bug and the above shouldn't fail? This seems a bit more odd to me. $ > foo $ declare -A foo=([bar]=*) $ echo "${foo[bar]}" * $ shopt -s nullglob $ declare -A foo=([bar]=*) $ echo "${foo[bar]}" $ echo "$BASH_VERSION" 4.2.45(2)-release That looks like a bug, maybe.
pgpjwn1bQYjKI.pgp
Description: PGP signature