"CDPATH=<str>" without the export will work as you'd want, and won't pollute the environment for subshells and scripts. It is unlikely you really want to export anything listed in the shell variables section of the man page, but yeah everybody does :/