set -e cd -P /bin d=$PWD CDPATH=/: cd -P . [ "$d" = "$PWD" ] cd -P ./ [ "$d" = "$PWD" ]