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

Re: autoload



On Sep 18,  8:49am, Ray Andrews wrote:
}
} > If we now throw zcompile into the mix, the -z / -k options to autoload
} > are ignored in favor of the -z / -k options to zcompile.  However, the
} > rule about the file name having to be the same as the function name
} > doesn't change.  Further "autoload -w" still doesn't define anything;
} > it just uses the index table in the zcompiled file to grab the list
} > of names to mark for later processing.
} 
} This could be made clearer in the docs.
[...]
} I see.  Nuts, there's nothing about that in the docs is there?

There's an entire section for "Autoloading Functions" but it has no
cross-reference from the "autoload" builtin (autoload points to
functions points to typeset which finally does have the section
reference).  I'll rearrange this a bit.

There IS a cross-reference to that section from the zcompile builtin.

}      $ autoload --just_DO_IT  Source.zwc
} 
} ... that is functionally identical to:
} 
}      $ for aa in /aWorking/Zsh/Source/*; do source $aa; done

You can do that:

FPATH=/aWorking/Zsh/Source autoload +X -w /aWorking/Zsh/Source/Source.zwc

The +X option is documented and means "load this now, but don't run it."



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