From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16813 invoked from network); 27 Sep 1999 13:03:05 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Sep 1999 13:03:05 -0000 Received: (qmail 28390 invoked by alias); 27 Sep 1999 13:02:07 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2619 Received: (qmail 28377 invoked from network); 27 Sep 1999 13:02:06 -0000 Date: Mon, 27 Sep 1999 14:02:04 +0100 From: Adam Spiers To: zsh-users@sunsite.auc.dk Subject: Re: cd, pwd and symlinks Message-ID: <19990927140204.A10336@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh-users@sunsite.auc.dk References: <19990927105103.A21392@youkaidi.irisa.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <19990927105103.A21392@youkaidi.irisa.fr> X-URL: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.9 i686 Hubert Canon (Hubert.Canon@irisa.fr) wrote: > Hi, > > I have strange behaviours with symlinks to directories. [snip] Put `setopt chaselinks' or `setopt chasedots' in your .zshrc. From the info pages: CHASE_DOTS When changing to a directory containing a path segment `..' which would otherwise be treated as cancelling the previous segment in the path (in other words, `foo/..' would be removed from the path, or if `..' is the first part of the path, the last part of $PWD would be deleted), instead resolve the path to the physical directory. This option is overridden by CHASE_LINKS. For example, suppose /foo/bar is a link to the directory /alt/rod. Without this option set, `cd /foo/bar/..' changes to /foo; with it set, it changes to /alt. The same applies if the current directory is /foo/bar and `cd ..' is used. Note that all other symbolic links in the path will also be resolved. CHASE_LINKS (-w) Resolve symbolic links to their true values when changing directory. This also has the effect of CHASE_DOTS, i.e. a `..' path segment will be treated as referring to the physical parent, even if the preceeding path segment is a symbolic link.