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

Re: autoload

On Sep 20,  4:21pm, Ray Andrews wrote:
} But you know what's in my head--something that's the equivalent of
} 'just sourcing' your functions, but doing it from precompiled code,
} and not pre-loading anything at all, but doing it only when the
} function is actually called.

Except for the point that "just sourcing" doesn't actually call the
function, everything you wrote is what DOES happen as long as the
functions are defined in separate files.  Because the language is
interpreted, the shell itself can't decompose a file into individual
function entry points the way e.g. a linker can for a shared object.
Requiring the file basename to be the same as the entry point name is
the most obvious way to handle this.

} You know Bart, with all the time you've spent on this, you could have 
} written that HOWTO ;-)

The problem is, I wouldn't have known what to write.

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