Prune the cd history only if there was no error.
-rw-r--r-- 1538 Makefile
-rw-r--r-- 1156 TODO.txt
-rwxr-xr-x 4293 bash-selector.sh
-rw-r--r-- 35147 gpl-3.0.txt
-rw-r--r-- 6158 selector.1
-rw-r--r-- 39122 selector.c