Hi everyone, I'm trying to use "failglob" option in several projects of mine and noticed the following strange behavior.
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: shopt -s nullglob failglob for file in *.rpm; do # Do something with the file done Am I missing some other, more important consideration here? If there is none, could this be considered a bug and fixed? 2) Unquoted globs in associative array initializers with failglob enabled produce an error, although the documentation doesn't mention any use of globs there and with failglob disabled globs don't seem to expand to anything. I.e. this fails: shopt -s failglob declare -A A=([a]=*) 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? Thank you. Sincerely, Nick