Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

`popd' is blocked on non-existent directory



Under zsh 3.0.0, if a directory in the directory stack is removed, popd
seems to get "blocked".  In 2.5, the non-existent directory would just be
removed from the stack.  Here's what happens:

1175 kontiki%> dirs -v                                                  ~/elisp
0       ~/elisp
1       ~/elisp/foo
2       ~/elisp/foo/tm
3       ~Sputnik/sdtmail
1176 kontiki%>                                                          ~/elisp
1176 kontiki%> popd                                                     ~/elisp
popd: no such file or directory: /space/jsc/elisp/foo
1177 kontiki%> dirs -v                                                  ~/elisp
0       ~/elisp
1       ~/elisp/foo
2       ~/elisp/foo/tm
3       ~Sputnik/sdtmail
1178 kontiki%>                                                          ~/elisp


I'm now unable to pop the stack back past the non-existent "~/elisp/foo"
directory.  I know I can `cd -3' but it would be much better to have the
non-existent stuff cleaned out of the stack.

Is there a way to get the old behavior, i.e. have all non-existent
directories removed from the stack?

Also, when there's only one entry left on the dir stack, (I think) a popd
used to remove it and pop me to my home directory.  This is no longer the
case in 3.0.0 .

Thanks,

    --- John.



Messages sorted by: Reverse Date, Date, Thread, Author