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

cd, pwd and symlinks



Hi,

I have strange behaviours with symlinks to directories.

youkaidi ~ % echo $PROMPT
%B%m %~ %#%b 
youkaidi ~ % mkdir foo
youkaidi ~ % mkdir foo/bar
youkaidi ~ % md bar
youkaidi ~ % cd bar
youkaidi ~/bar % ln -s ../foo/bar foo
youkaidi ~/bar % cd foo
youkaidi ~/bar/foo % ls ..
bar
youkaidi ~/bar/foo % pwd
/udd/canon/foo/bar
youkaidi ~/bar/foo % /bin/pwd
/udd/canon/foo/bar
youkaidi ~/bar/foo % cd ..
youkaidi ~/bar % 



when I type `cd ../' followed with TAB, I get the expansion `cd ../bar'
and if I hit ENTER, I get :

youkaidi ~/bar/foo % cd ../bar 
cd: no such file or directory: ../bar

I have no problem with that :

youkaidi ~/bar/foo % cd ..
youkaidi ~/bar % 

But I would like a way to do something like that :

youkaidi ~/bar/foo % cd ./..     
youkaidi ~/foo % 

instead of `youkaidi ~/bar % ', that is going the directory given by
/bin/pwd, i.e. the directory without any symlinks, the same that is
used for the ls command and the completion system.





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