From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 905 invoked by alias); 22 Jun 2012 08:24:25 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17156 Received: (qmail 14807 invoked from network); 22 Jun 2012 08:24:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at necoro.eu does not designate permitted sender hosts) Message-ID: <4FE42A6D.4000107@necoro.eu> Date: Fri, 22 Jun 2012 10:18:53 +0200 From: =?UTF-8?B?UmVuw6kgTmV1bWFubg==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120612 Thunderbird/13.0 MIME-Version: 1.0 To: TJ Luoma CC: Zsh-Users List Subject: Re: source ~/dir/*.zsh References: <-1148869711641803316@unknownmsgid> In-Reply-To: <-1148869711641803316@unknownmsgid> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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