Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: cd, pwd and symlinks
- X-seq: zsh-users 2619
- From: Adam Spiers <adam@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: cd, pwd and symlinks
- Date: Mon, 27 Sep 1999 14:02:04 +0100
- In-reply-to: <19990927105103.A21392@xxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990927105103.A21392@xxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Hubert Canon (Hubert.Canon@xxxxxxxx) 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author