Bart Schaefer writes: > The compatible-with-other-shells behavior in this case would be to issue a > `directory stack empty' error message. (However, I could see an argument > that PUSHD_TO_HOME ought to apply to popd as well.) Thanks. I've added a little code to do what you suggest and have popd also honor the PUSHD_TO_HOME option. Now, if you popd when there's a single dirstack entry and PUSHD_TO_HOME is set, it'll pop you to your home directory: 160 kontiki%> setopt pushdtohome 162 kontiki%> dirs /usr/bin /tmp 163 kontiki%> dirs ~ /usr/bin /tmp 164 kontiki%> popd /usr/bin /tmp 165 kontiki%> popd /tmp 165 kontiki%> popd ~ .. and with pushdtohome unset: 156 kontiki%> unsetopt pushdtohome 157 kontiki%> dirs /usr/bin /tmp 158 kontiki%> dirs ~ /usr/bin /tmp 159 kontiki%> popd /usr/bin /tmp 160 kontiki%> popd /tmp 160 kontiki%> popd popd: directory stack empty I've attached the diffs (which include your changes):