zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "Andrej Borsenkow" <borsenkow.msk@sni.de>,
	"ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: Re: PATCH: Re: pws-19: compinstall should build absolute paths
Date: Mon, 31 May 1999 07:08:29 +0000	[thread overview]
Message-ID: <990531070829.ZM4030@candle.brasslantern.com> (raw)
In-Reply-To: <000201beab30$9326dc50$21c9ca95@mow.siemens.ru>

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


      reply	other threads:[~1999-05-31  7:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-27 15:05 Andrej Borsenkow
1999-05-29 10:30 ` PATCH: " Bart Schaefer
1999-05-31  6:41   ` Andrej Borsenkow
1999-05-31  7:08     ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=990531070829.ZM4030@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=borsenkow.msk@sni.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).