How do I find out where a particular bash function, for example foo, is defined?
shopt -s extdebug declare -F foo