On Sat, Apr 1, 2023, at 4:49 PM, Denys Vlasenko wrote: > Just now, I learned that CDPATH is a thing... oh god. > Yet another danger of subtle bugs in scripts when one > of their innocuous "mkdir subdir; cd subdir" suddenly > cd's somewhere else... > ..and this "feature" seems to be in bash too, > and who knows where else. At a minimum: - traditional Bourne shells since 1983 [1] - POSIX [2] - busybox - ksh and friends - yash - zsh [1]: https://www.in-ulm.de/~mascheck/bourne/#svr1 [2]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html -- vq