zsh-users
 help / color / mirror / code / Atom feed
From: Zach Riggle <zachriggle@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re-loading files loaded via "autoload"
Date: Wed, 11 Aug 2021 02:49:16 -0500	[thread overview]
Message-ID: <CAMP9c5kjuw4sxS0ZsCTN_Vkd=4SZNhx8Vg3UCcoNPi-Y9TK3Rg@mail.gmail.com> (raw)

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


             reply	other threads:[~2021-08-11  7:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11  7:49 Zach Riggle [this message]
2021-08-11 18:25 ` Mikael Magnusson
2021-08-11 18:56   ` Bart Schaefer
2021-08-12 16:04   ` Philippe Troin
2021-08-13  2:29     ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMP9c5kjuw4sxS0ZsCTN_Vkd=4SZNhx8Vg3UCcoNPi-Y9TK3Rg@mail.gmail.com' \
    --to=zachriggle@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).