From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1684 invoked from network); 31 May 1999 07:08:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 May 1999 07:08:44 -0000 Received: (qmail 513 invoked by alias); 31 May 1999 07:08:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6375 Received: (qmail 504 invoked from network); 31 May 1999 07:08:39 -0000 From: "Bart Schaefer" Message-Id: <990531070829.ZM4030@candle.brasslantern.com> Date: Mon, 31 May 1999 07:08:29 +0000 In-Reply-To: <000201beab30$9326dc50$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "RE: PATCH: Re: pws-19: compinstall should build absolute paths" (May 31, 10:41am) References: <000201beab30$9326dc50$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrej Borsenkow" , "ZSH workers mailing list" Subject: Re: PATCH: Re: pws-19: compinstall should build absolute paths MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 31, 10:41am, Andrej Borsenkow wrote: } Subject: RE: PATCH: Re: pws-19: compinstall should build absolute paths } } > +if [[ ${~_ci_fdir} != /* ]]; then } > + _ci_fdir=$(cd $_ci_fdir;builtin pwd) } > +fi } > } > # Check if this is in fpath already, else put it there (with ~'s } > expanded). } > _ci_f=${~_ci_fdir} } > } } Ehh ... but at this point _ci_fdir is an absolute path ... and starts with } ``/'' ... so _ci_f is set to some directory in HOME instead to _ci_fdir, is } not it? Is not it. Note the ${ } there; the ~ in the assignment just causes any glob patterns or tildes in the value of $_ci_fdir to be expanded. What the lines I added do is, if attempting to expand the value of $_ci_fdir does not produce a full path, then force it to be a full path. If there is already a home-directory reference (that is, a tilde) in $_ci_fdir then [[ ${~_ci_fdir} != /* ]] will be false and the full path is not recomputed. Then the pre-existing bit of code following "# Check if ..." expands the full path again and stuffs that in $_ci_f. The end result, I believe, is that the unexpanded home-directory reference goes into .zshrc, but the expanded full path is used in $fpath. If you don't find that's what is happening, let me know. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com