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

Re: order of sourcing



On Tue, Jan 17, 2023 at 10:34 PM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Jan 17, 2023 at 1:24 PM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > The standard solution is to autoload functions. It solves a bunch of
> > other problems that you get when sourcing files with function
> > definitions
>
> One complication here is that, if Ray is able to use "source" to load
> a function's definition, then he's not writing the file in the
> ordinary autoload format

Almost certainly. If he were to switch to autoloading (which I think
is a good idea), he would have to move things around.

> That needs "autoload -U" I think?

I usually go with `autoload -Uz` for good measure so that I don't have
to think about current options at all.

Roman.




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