Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Some strange behavior of %~
- X-seq: zsh-users 9292
- From: "Artur Penttinen" <arto-p@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Some strange behavior of %~
- Date: Thu, 11 Aug 2005 15:37:19 +0400 (MSD)
- In-reply-to: <17079.1123753982@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <42FAFC8D.000002.21101@xxxxxxxxxxxxxxxxx> <17079.1123753982@xxxxxxx>
- Reply-to: arto-p@xxxxxxxxx
- Sender: arto-p@xxxxxxxxx
>"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