From: "René Neumann" <lists@necoro.eu>
To: TJ Luoma <tj@luo.ma>
Cc: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: source ~/dir/*.zsh
Date: Fri, 22 Jun 2012 10:18:53 +0200 [thread overview]
Message-ID: <4FE42A6D.4000107@necoro.eu> (raw)
In-Reply-To: <-1148869711641803316@unknownmsgid>
Am 22.06.2012 02:01, schrieb TJ Luoma:
> I have split my .zshenv into a bunch of different files which all end
> with different suffixes. For example, functions are called "foo.f.zsh"
> or "bar.f.zsh"
>
> My idea was to put them all into a special directory and then source
> them like so in ~/.zshenv
>
> source ~/dir/*.f.zsh
A file bla.f.zsh contains exactly the function
bla ()
{
# bla_content
}
?
If so: just put all functions in a single dir (say ~/.zsh/functions/).
And there into a file 'bla' you put just "# bla_content", i.e. you omit
the function definition.
Then via
typeset -U path fpath
fpath=(~/.zsh/functions $fpath)
# load all things in there
autoload ${fpath[1]}/*(:t)
you have all you wanted :)
Sorry, if this description is confusing -- see here [1] for the official
documentation on this feature.
- René
[1] http://zsh.sourceforge.net/Doc/Release/Functions.html
prev parent reply other threads:[~2012-06-22 8:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 0:01 TJ Luoma
2012-06-22 8:12 ` Frank Terbeck
2012-06-22 8:18 ` René Neumann [this message]
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=4FE42A6D.4000107@necoro.eu \
--to=lists@necoro.eu \
--cc=tj@luo.ma \
--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).