Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: order of sourcing
- X-seq: zsh-users 28650
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Ray Andrews <rayandrews@xxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: order of sourcing
- Date: Tue, 17 Jan 2023 22:42:44 +0100
- Archived-at: <https://zsh.org/users/28650>
- In-reply-to: <CAH+w=7Zou6MhCO3W1m_E+J-Nv641UCy7aN8t=O_d4iEQ+m=q9Q@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <bb9bb69a-8608-ec18-d340-740fc813eec3@eastlink.ca> <CAN=4vMqV+uxJXBLoOYGicAXjB07yv7mwrUS26hG34J0PnUNK_w@mail.gmail.com> <CAH+w=7Zou6MhCO3W1m_E+J-Nv641UCy7aN8t=O_d4iEQ+m=q9Q@mail.gmail.com>
On Tue, Jan 17, 2023 at 10:34 PM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Jan 17, 2023 at 1:24 PM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > The standard solution is to autoload functions. It solves a bunch of
> > other problems that you get when sourcing files with function
> > definitions
>
> One complication here is that, if Ray is able to use "source" to load
> a function's definition, then he's not writing the file in the
> ordinary autoload format
Almost certainly. If he were to switch to autoloading (which I think
is a good idea), he would have to move things around.
> That needs "autoload -U" I think?
I usually go with `autoload -Uz` for good measure so that I don't have
to think about current options at all.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author