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

Re: `cd .` in non-existent directory leads into weird corner case



On Mon, Apr 2, 2012 at 12:15, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:

> Weird, when I try making a directory and remove it, I can still cd ..
> to the parent... I can even cd into the dir with another shell (via
> /proc/$$/cwd), and cd .. to the correct parent dir from that other
> shell.

We must be trying to do different things...

% zsh -f
adamantium% mkdir blubb
adamantium% cd blubb
adamantium% pwd
/home/richih/blubb
adamantium% rmdir /home/richih/blubb
adamantium%  cd .
adamantium% pwd
.
adamantium% stat .
  File: `.'
  Size: 6               Blocks: 0          IO Block: 4096   directory
Device: 802h/2050d      Inode: 134300028   Links: 0
Access: (0755/drwxr-xr-x)  Uid: ( 1000/  richih)   Gid: ( 1000/  richih)
Access: 2012-04-02 14:56:15.416702007 +0200
Modify: 2012-04-02 14:56:15.416702007 +0200
Change: 2012-04-02 14:56:30.056251660 +0200
 Birth: -
adamantium% mkdir test
mkdir: cannot create directory `test': No such file or directory
adamantium% touch test
touch: cannot touch `test': No such file or directory
adamantium%



Richard



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