Recognising directory stack entries for the 'cd' builtin is not compatible with POSIX, because cd'ing into directories with names like +123 or -4567 no longer works without prefixing './', even after '--'. In POSIX, only the '-' operand has such a special meaning. The attached patch disables directory stack entries for 'cd' if POSIX_CD is active. This patch also changes the behaviour of the 'chdir' equivalent. For POSIX compliance, only 'cd' needs to be changed, as POSIX has no 'chdir'. I could change the patch to only change 'cd', but it would involve slightly more code, and would make 'cd' and 'chdir' no longer exactly equivalent. If this is preferred, please let me know. Thanks, - M. -- modernish -- harness the shell https://github.com/modernish/modernish