From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh hackers list" <zsh-workers@sunsite.dk>
Subject: Re: Feature suggestion for autoload
Date: Tue, 15 Jul 2008 18:39:48 -0700 [thread overview]
Message-ID: <080715183948.ZM10577@torch.brasslantern.com> (raw)
In-Reply-To: <2d460de70807151010m344b9a7dmeaca569f538b51c8@mail.gmail.com>
On Jul 15, 7:10pm, Richard Hartmann wrote:
}
} I just wanted to put some functions in an extra folder & autoload
} them, but I don't have my ZSH book here so I could not look up
} the snippet to autoload all functions in a directory.
Er, how would you do anything *else* to all the files in a directory?
OK, so it's not *quite* that easy because you need file base names, but
even if you can't remember
fpath+=(thedirectory)
autoload thedirectory/*(:t)
then it still shouldn't be too hard to think of
fpath+=(thedirectory)
cd thedirectory
autoload *
cd -
Some people make all/only the autoloadable functions executable so
that they can use
autoload *(*)
} This has got me thinking about an extra option for autoload which
} allows you to autoload all functions in a directory.
"autoload" is just an alias for "typeset -fu" ... I'm excited neither
about making it a separate implementation nor about teaching typedef
how to read directories.
} Additionally, an option to autoload everything it finds could be
} useful for some though I doubt I would use it.
"Finds" where?
Anyway, have a look at the zcompile builtin ...
} Another option would be to define an array and load everything
} in said array. This could make a long list os autoloads more
} readable.
Yes, you can certainly do that. There's no practical limit on the
number of function names you can pass to a single autoload command.
next prev parent reply other threads:[~2008-07-16 1:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 17:10 Richard Hartmann
2008-07-16 1:39 ` Bart Schaefer [this message]
2008-07-16 23:44 ` Richard Hartmann
2008-07-17 0:55 ` Phil Pennock
2008-07-17 9:05 ` Peter Stephenson
2008-07-17 13:24 ` Richard Hartmann
2008-07-17 13:43 ` Bart Schaefer
2008-07-17 14:33 ` Richard Hartmann
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=080715183948.ZM10577@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/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).