On Mon, Mar 11, 2019 at 01:15:16PM -0700, L A Walsh wrote: > 1) Where is it documented that if you export a function, the original > source location is thrown away by bash?
It's not documented so much as blatantly obvious by looking at how it's implemented. wooledg:~$ export -f title wooledg:~$ env | grep -A2 title BASH_FUNC_title%%=() { local IFS=' '; printf '\e]2;%s\a' "$*" } There's nowhere in that variable to store metadata such as original source file or line number. You'd need a second variable at the very least. It would require a modification of the function export/import code, and this would break compatibility *again* (just like the shellshock patches did when they changed the implementation).