Using the chpwd hook function causes some junk to be printed to STDOUT after returning from a subshell wherein the working directory was changed. In rare cases, this can cause issues with 3rd party tools. An example is this issue with the Python virtualenvwrapper tool: https://bitbucket.org/dhellmann/virtualenvwrapper/issue/216/lsvirtualenv-and-workon-output-broken-in