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

Re: Some strange behavior of %~



"Artur Penttinen" wrote:
>   # cd work
>   # print -P "%~"
>   ~/work
>   # cd ../work
>   # print -P "%~"
>   /hipsohome/home/arpentti/work
>   # print $ZSH_VERSION
>   4.2.5
>   #

This is probably something to do with using an automounter.  I would
guess that $HOME is /home/arpentti, right?  On the second system, 
this probably gets created as a link to /hipsohome/home/arpentti which
will be where the automounter mounts the directory.  (Or the person
responsible just likes symbolic links.)

Quite why the cd works that way I'm not sure, but it's possibly you
have the CHASE_LINKS option set, in which case the symbolic links are
resolved.  But that obviously didn't happen with the first cd.

Using both "pwd -L" and "pwd -P" (print logical and physical directory)
after each step might make it clearer.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



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