From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Ray Andrews <rayandrews@eastlink.ca>, Zsh Users <zsh-users@zsh.org>
Subject: Re: order of sourcing
Date: Tue, 17 Jan 2023 22:42:44 +0100 [thread overview]
Message-ID: <CAN=4vMqMGnhrttpMYD4fLcs2vwwA2amxM4u_uL51eBkkJkrycw@mail.gmail.com> (raw)
In-Reply-To: <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@brasslantern.com> wrote:
>
> On Tue, Jan 17, 2023 at 1:24 PM Roman Perepelitsa
> <roman.perepelitsa@gmail.com> 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.
next prev parent reply other threads:[~2023-01-17 21:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 21:07 Ray Andrews
2023-01-17 21:24 ` Roman Perepelitsa
2023-01-17 21:34 ` Bart Schaefer
2023-01-17 21:42 ` Roman Perepelitsa [this message]
2023-01-17 21:48 ` Ray Andrews
2023-01-18 21:23 ` Bart Schaefer
2023-01-18 23:44 ` Ray Andrews
2023-04-16 16:14 Ray Andrews
2023-04-16 16:17 ` Roman Perepelitsa
2023-04-16 16:48 ` Ray Andrews
2023-04-16 20:22 ` Ray Andrews
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='CAN=4vMqMGnhrttpMYD4fLcs2vwwA2amxM4u_uL51eBkkJkrycw@mail.gmail.com' \
--to=roman.perepelitsa@gmail.com \
--cc=rayandrews@eastlink.ca \
--cc=schaefer@brasslantern.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).