From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Pier Paolo Grassi <pierpaolog@gmail.com>, TJ Luoma <luomat@gmail.com>
Cc: "Zsh-Users List" <zsh-users@zsh.org>
Subject: Re: separating functions, fpath, and autoload
Date: Mon, 13 Aug 2018 14:31:44 +0000 [thread overview]
Message-ID: <1534170704.3055908.1472497128.24A0E402@webmail.messagingengine.com> (raw)
In-Reply-To: <CAP+y1xB4jzy-8HVEjSU0aX0kpcyAn98TAcm3UGBL0fDUi1+pCw@mail.gmail.com>
In more words:
'autoload foo' marks 'foo' as the name of a function that will be
instantiated upon the first call to it. After calling foo, you'll
see the actual definition of foo: 'autoload foo; foo; which foo'.
You can pass +X to 'autoload' to load the function immediately
(before it's called).
More below.
Pier Paolo Grassi wrote on Mon, 13 Aug 2018 15:56 +0200:
> that should be correct, the autoload will be executed when you first invoke
> msg, have you tried invoking it?
> Il giorno lun 13 ago 2018 alle 15:50 TJ Luoma <luomat@gmail.com> ha scritto:
> > if [ -d "$ZDOTDIR/functions" ]
> > then
> > fpath=($ZDOTDIR/functions $fpath)
Another way:
fpath=( $ZDOTDIR/functions(N) $fpath )
or even
fpath[1,0]=( $ZDOTDIR/functions(N) )
then you don't need an if.
next prev parent reply other threads:[~2018-08-13 14:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-13 13:49 TJ Luoma
2018-08-13 13:55 ` TJ Luoma
2018-08-13 13:56 ` Pier Paolo Grassi
2018-08-13 14:31 ` Daniel Shahaf [this message]
2018-08-13 15:38 ` ticking clock Ray Andrews
2018-08-13 16:29 ` Vin Shelton
2018-08-13 19:57 ` Ray Andrews
2018-08-13 21:54 ` Bart Schaefer
2018-08-13 22:45 ` Ray Andrews
2018-08-14 17:27 ` Bart Schaefer
2018-08-14 21:21 ` Ray Andrews
2018-08-14 10:07 ` Sebastian Gniazdowski
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=1534170704.3055908.1472497128.24A0E402@webmail.messagingengine.com \
--to=d.s@daniel.shahaf.name \
--cc=luomat@gmail.com \
--cc=pierpaolog@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).