From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29050 invoked from network); 29 Sep 1999 01:11:54 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Sep 1999 01:11:54 -0000 Received: (qmail 1459 invoked by alias); 29 Sep 1999 01:11:39 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2628 Received: (qmail 1452 invoked from network); 29 Sep 1999 01:11:38 -0000 Message-Id: <199909290111.UAA02510@warthog.com> To: zsh-users@sunsite.auc.dk From: Rob Windsor Reply-To: Rob Windsor Subject: Re: cd, pwd and symlinks X-Files: THE TRUTH IS OUT THERE In-reply-to: Your message of "27 Sep 1999 19:05:02 EDT." <5lemfkez1d.fsf@tequila.cs.yale.edu> Date: Tue, 28 Sep 1999 20:11:34 -0500 Sender: windsor@warthog.com Verily did "Stefan Monnier" write: >>> 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 % >> Put `setopt chaselinks' or `setopt chasedots' in your .zshrc. From >> the info pages: > I must say I don't like the names and defaults. The names give the > impression that chasing links is a very unusual feature while it's the > normal unix behavior. That depends wholly upon the shell. C-shell variants do it one way, sh sorta does it like zsh (the items marked with a `*' above are like csh, but because sh doesn't appear to have a builtin cd(1) or pwd(1)). Zsh does it (by default?) the same way that ksh does. The use of symlinks pointing to subdirs has long been flagged as A Bad Idea due to the handling of `..', so "ymmv" when you choose to use them. > But apart from that, I'm more often annoyed by `pwd' not checking the > value it returns: > ~/tmp-0% mkdir foo > ~/tmp-0% cd foo > tmp/foo-0% mv ../foo ../bar > tmp/foo-0% pwd > /home/monnier/tmp/foo > tmp/foo-0% > This is with 3.0.6, And ksh does the same thing. Again, sh(1) doesn't do this because it doesn't have a builtin pwd(1). I'm surely not complaining about how zsh handles either of these behaviors, I prefer a ksh-on-steriods look and smell for a shell. -- Rob ---------------------------------------- Internet: windsor@warthog.com __o Life: Rob@Carrollton.Texas.USA.Earth _`\<,_ (_)/ (_) The weather is here, wish you were beautiful.