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

Re-loading files loaded via "autoload"



Hello all!

Thanks in advance for my spam.  I recently spent some time spelunking
in the Zsh docs for how to get an "autoload"ed module (sorry if the
terminology is incorrect) to be re-loaded.

It appears this is possible, but not well documented.

Specifically, "unfunction" or "unset -f" work to permit the "autoload
foo" to run again, and re-define the various functions declared in the
module.

What's the appropriate venue to ask for documentation updates, since
this should likely be in the documentation for [1].

# Homework

I looked at the documentation page for autoloading functions [1] as
well as the page for the autoload builtin itself [2].

As always, SEARCHING the man page / info page / HTML pages are
difficult, because it's not possible to scope the search results to
"just this section here" so searching for "remove" or "reload" shows
lots of unrelated hits.

Because "autoload" has its own page, the behavior of unfunction /
unset -f should probably be documented there.

[1]: https://zsh.sourceforge.io/Doc/Release/Functions.html#Functions
[2]: https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html

Zach Riggle




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