make sure to unexport some functions, fix #2872
use the external repository for chpwd_functions bash implementation, update #2819
do not unexport functions for bash set -a, update #2872