From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>,
<zsh-workers@sunsite.auc.dk>
Subject: Re: Is this statement correct?
Date: Tue, 19 Sep 2000 07:18:50 +0000 [thread overview]
Message-ID: <1000919071851.ZM30493@candle.brasslantern.com> (raw)
In-Reply-To: <000001c021fd$80f81b80$21c9ca95@mow.siemens.ru>
On Sep 19, 9:50am, Andrej Borsenkow wrote:
} Subject: RE: Is this statement correct?
}
} > > This is not usually
} > > a problem, because zsh always looks for the newest file when loading a
} > > function, but it may cause slower shell startup and function loading.
}
} It does not work:
}
} bor@itsrm2% print $fpath
} /home/bor/.zsh.d/completion /home/bor/.zsh.d/std-3.1.9-dev-6.zwc
} /home/bor/.zsh.d/functions /tools/share/zsh/site-functions ... (standard
} part follows)
} bor@itsrm2% ll /tools/share/zsh/3.1.9-dev-6/functions/Core/_match
} -rw-r--r-- 1 root other 1539 Sep 19 09:44
} /tools/share/zsh/3.1.9-dev-6/functions/Core/_match
} bor@itsrm2% ll ~/.zsh.d/std-3.1.9-dev-6.zwc
} -rw------- 1 bor sinix 1491984 Sep 18 11:08
} /home/bor/.zsh.d/std-3.1.9-dev-6.zwc
}
} Zsh takes _match from digest file and *not* from external definition.
} Even if it is newer.
The order of $fpath takes precedence over the newness of the files. It
doesn't search for the newest thing anywhere in $fpath; it checks for
the newest one of any two otherwise-equivalent sources of the function.
In particular, zsh does not read the name of the source file out of the
digest file and try to find it. The autoload-time checks are all done
relative to *directories* named in $fpath. If you put a digest name
into $fpath (as you have), then that file is accepted automatically.
If on the other hand you leave directory names in the path and put the
digest file alongside the directory (within that directory's parent),
then zsh will check for the newer of a function in the directory or a
function in the digest file.
So if you have fpath=(/zsh/fdir) and these three files:
/zsh/fdir.zwc /zsh/fdir/func /zsh/fdir/func.zwc
Then zsh will always pick the newest one for the definition of "func".
I suppose the example in contrib.yo is a bit misleading because it
replaces the directory names with digest file names in $fpath. That's
actually not necessary for zrecompile to work.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2000-09-19 7:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-07 11:41 Sven Wischnowsky
2000-09-19 5:50 ` Andrej Borsenkow
2000-09-19 7:18 ` Bart Schaefer [this message]
2000-09-19 8:00 ` PATCH: " Andrej Borsenkow
-- strict thread matches above, loose matches on Subject: below --
2000-09-07 11:26 Andrej Borsenkow
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=1000919071851.ZM30493@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=Andrej.Borsenkow@mow.siemens.ru \
--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).