Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: autoload +X xxx zero reference count
- X-seq: zsh-workers 54366
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: autoload +X xxx zero reference count
- Date: Thu, 16 Apr 2026 21:44:42 +0200
- Archived-at: <https://zsh.org/workers/54366>
- In-reply-to: <CAH+w=7azX-oQpKRCSVBtZJq22rinWvSLC70msD9Ti9_83MLLWw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHYJk3T-dvxQ7JPfq7GRyQf_YWhbpuH7vw52kZ33C0Ltb5X4LA@mail.gmail.com> <CAH+w=7azX-oQpKRCSVBtZJq22rinWvSLC70msD9Ti9_83MLLWw@mail.gmail.com>
Bart Schaefer wrote:
> I know you said "beside the point" but:
>
> autoreload () {
...
> do
> w=($(whence -v "$fn"))
There's also a functions_source associative array as an alternative to
parsing the output of whence:
freload() {
local func src
for func; do
[[ ${src::=${functions_source[$func]}} = *.* ]] && continue
unfunction ${(k)functions_source[(R)${(b)src:-X(#s)}]:-$func}
autoload -U ${src:-$func}
done
}
Still doesn't help with the reference count error, though.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author