Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: pws-19: compinstall should build absolute paths
- X-seq: zsh-workers 6375
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <borsenkow.msk@xxxxxx>, "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: PATCH: Re: pws-19: compinstall should build absolute paths
- Date: Mon, 31 May 1999 07:08:29 +0000
- In-reply-to: <000201beab30$9326dc50$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <000201beab30$9326dc50$21c9ca95@xxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author