From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 236 invoked from network); 10 Apr 2000 08:37:32 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Apr 2000 08:37:32 -0000 Received: (qmail 25700 invoked by alias); 10 Apr 2000 08:37:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10617 Received: (qmail 25687 invoked from network); 10 Apr 2000 08:37:25 -0000 Date: Mon, 10 Apr 2000 10:37:21 +0200 (MET DST) Message-Id: <200004100837.KAA32018@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Mon, 10 Apr 2000 03:48:51 +0000 Subject: Re: Compinstall, zcompile, and my .zshrc Bart Schaefer wrote: > ... > > Second, it'd be nice if I could do something like > > zcompile .zshrc.zwc .zshrc .zsh/* > > but I'm 100% certain that's not going to produce the result I want. For > one thing, `. .zsh/foo' executed from the code in .zshrc.zwc is going to > look for .zsh/foo{,.zwc}, not discover that .zsh/foo is already compiled > into the current file. For another, I don't know how the `.' command > decides that xxx.zwc is the compiled form of xxx, but I wouldn't expect > it to use a multi-file archive that way. (Hmm, trying it, though, seems > to show that it *will* use a multi-file archive, but that only works for > the very first file in such an archive.) As for loading functions from a zwc files it checks if the (basename of the) name of the sourced file is in the zwc file. And the loads it. In other words, you can use symbolic links: zcompile .zshrc.zwc .zshrc .zsh/* for i in .zsh/*; do ln -s .zshrc.zwc ${i}.zwc; done > ... > > There's one other thing I've just started worrying about with zcompile. > Normally in my .zshrc I could do something like this: > > [[ $ZSH_VERSION > 3.1.6 ]] && alias typeset='typeset -g' > > and now all later uses of typeset would get the -g option, because the > code for .zshrc is actually executing as it's read. But if I zcompile > my .zshrc, the wordcode for the rest of the file beyond that point does > NOT have that alias expanded. That's a serious drawback for compilation > of scripts, and particularly of .z* init files; it should probably be > called out explicitly in the docs. Yes, together with the other things that affect lexing/parsing, like RC_QUOTES and friends. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de