Bash Version: 3.2 Patch Level: 33 Release Status: release Description:
The 'set' command is supposed to print function definitions "in a format that may be reused as input for setting or resetting the currently-set variables." However, it misformats command lists that use heredocs. The 'type' command has the same problem. (I noticed this problem because Gentoo's build system tries to save and restore the environment this way, and it was producing syntax errors.) Repeat-By: somefunc() { cat << EOF && echo done hello world EOF } In the output of set, the function is reformatted as: somefunc () { cat <<EOF hello world EOF && echo done } which is a syntax error.