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

Re: Feature suggestion for autoload



On Wed, Jul 16, 2008 at 03:39, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:


>    fpath+=(thedirectory)
>    autoload thedirectory/*(:t)

Peter's snippet is

  autoload -- ~/.zfunc/[^_]*(:t)

It was the part with not loading files that have a leading underscore that
eluded me.


>    fpath+=(thedirectory)
>    cd thedirectory
>    autoload *
>    cd -

True, but that's not as elegant as the above. As it was not time critical,
I prefered not to 'hack' something up.


> "autoload" is just an alias for "typeset -fu" ... I'm excited neither
> about making it a separate implementation nor about teaching typedef
> how to read directories.

Good reason, agreed.


> "Finds" where?

What I meant was 'autoload every file you find in fpath'. That suggestion
is moot now, though.


> Yes, you can certainly do that.  There's no practical limit on the
> number of function names you can pass to a single autoload command.

Brain fart, of course you can. Sorry.


Thanks,
Richard



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