Op 04-11-16 om 01:27 schreef Eduardo Bustamante: > I agree with everything, except calling it severe. This is > self-inflicted harm, and easy to work around
It is not self-inflicted. The behaviour is a bug in bash. The user did nothing to cause that bug. Even if you think it's somehow reasonable to expect bash users to be aware of this bug while using or coding for bash (though the bug has not been publicised anywhere), bash is supposed to be a POSIX shell, and POSIX is supposed to be a standard. You cannot assume that the code bash executes is written with bash bugs in mind. It is also not "easy" to work around. If your program for any reason needs to split strings on any of the characters ?, *, [ and ], and uses field splitting to achieve this (which in POSIX is the canonical method), you will now need to program a workaround with something like sed or parameter substitutions. Unless, of course, the easy workaround is to simply use another shell. Another big issue is that third-party library functions need to work for arbitrary values of IFS. This bug makes that impossible for bash. For instance, if you recall, the original bug reporter wanted to split some string by "*" on an interactive shell. This caused a freeze upon using auto-completion because the bash-completion package broke as a result. Chet initially blamed it on bash-completion, but in fact the fault was with bash itself. The resulting breakage was clearly severe. - M.