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

Re: cd, pwd and symlinks



Adam Spiers, on thelonious (adam@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> Hubert Canon (Hubert.Canon@xxxxxxxx) wrote:
> > But I am a bit confused, because I would like that `cd ..' had the
> > present behaviour (when these options are unset) and that I use
> > another construct (like `cd ./..' for example) when I want to follow
> > links.
> 
> Sounds like a reasonable request.  You could implement it with a
> function:
> 
>   function ccd {
>     # Chase Change Directory
>     setopt localopts chaselinks
>     builtin cd "$@"
>   }
> 
> and then do 
> 
>   % ccd ..
> 
> or even as a wrapper around cd, but I'll leave that as an exercise to
> the reader :-)

This is of course all stupid.  If I had a brain I would have consulted
the manual before giving advice.  Check out the -L and -P options to cd.



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