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.)

  Yes, You're right.
  # ls -l /home
  lrwxr-xr-x  1 root  wheel  15 Aug 23  2004 /home@ -> /hipsohome/home
  #

>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.

  # [[ -o chaselinks ]] || print no
  no
  # 

  Question: what i will set for proper behavior of `%~' ?
  Yes, I can set HOME=/hipsohome/home/arpentti, but imho,
  this is politically incorrect...


-- 
wbw, artur penttinen



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