Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: was: Re: endianness of wordcode



On Mar 28,  2:32pm, Sven Wischnowsky wrote:
} Subject: PATCH: was: Re: endianness of wordcode
}
} > } > 	zcompile -c foo foo bar frob ding
[then in a new shell]
} > } > 	fpath=($PWD)
} > } > 	autoload foo
} > } > 	foo
} >
} > ...
} > 
} > The question in this first case is:  `bar', `frob' and `ding' do not
} > become available when foo is autoloaded, but why not?  If I had a text
} > (not .zwc) file named `foo' inside a directory in $fpath, and that
} > file contained four functions, and I said to autoload foo and then I
} > executed foo, all four functions would become defined.
} 
} Maybe it would be clearer if we made people pay more attention to the
} files. Because: if I have a couple of function definition files,
} containing the functions foo, bar, frob and ding (in $PWD) and I do
} 
}   fpath=($PWD)
}   autoload foo
}   foo
} 
} this makes available (and before that: autoloaded(!)) only foo. And
} with a zwc file it's just the same.

The case I'm thinking of is one like Completion/User/_cvs, where there
is a "primary" function and a whole bunch of "helpers" all in one file.
The following produce the same result in _cvs.zwc:

(1)	cd $^fpath/_cvs(|)(:h)
	zcompile _cvs

(2)	compinit
	zcompile -c _cvs _cvs

But this produces something different:

(3)	compinit
	cvs <TAB><C-U>
	zcompile -c _cvs _cvs

And it also doesn't "work" to list all the helper functions explicitly.

I don't mind the discrepancy between (1) and (3) so much, but (2) and (3)
is really unfortunate.  Maybe an additional (or simply different) option
should be required to get the effect of (2)?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author