From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14142 invoked by alias); 13 Aug 2018 14:41:21 -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: List-Unsubscribe: X-Seq: 23573 Received: (qmail 29512 invoked by uid 1010); 13 Aug 2018 14:41:21 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.25):SA:0(-2.6/5.0):. Processed in 2.396397 secs); 13 Aug 2018 14:41:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=7EErZA KrkcT4ijg3rME+vv4aEkaBIYHtH7/uZYvDbfU=; b=gykL1dVMJwV+FNI3+A9KnK RkEljnq74vD0wjPOvAj6PCihLp87jlyoO4RBljRRj1a3MlZiG0TYN/CIWWNkw3O0 SDd5MbO8fZqVfAGBGVQWNHZM4DgdnxB6TImrj0IDnOO+jtQYfkWrwqSF/v8I36eS dU20736EOoX+1lX2+ODzpxw2WCivZxYwFNIFyVy88glyFbxxPax0x7IyajhEQuGy spZkLw75EHxyIaxv/JhMIy1O9b9jzEiSJ3gpWMrYh1D0twpS7ZUEOteNuPtXA5lU GZdY953uX9VUAeZ2tgZRhUrYUn4EqSKXjJIvDXS1TQso0JVfvHHGfB04NXXv2gvg == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=7EErZA KrkcT4ijg3rME+vv4aEkaBIYHtH7/uZYvDbfU=; b=k8I3gtF75T7agQu/zoMNz4 AS/sLu8C916bRD0t2SkEYdnHoDPTSGL4ckfr8t2LpvBK68grggkdURkGpw15HiYZ UO4fvRY0eNn/7SF2QXeU2I9X9n0DdNfxMQ9m/J+IS/qE4Yv5EiYzBoB05TiE5yWf aYsLUqsyfu97tOIRMDqx6uu0Wt880SmHoQFVo8popLuOUN1fw6nk9niMap/Qrss3 9ifJkQEwiQI3mtJ3UIxlih6yPvNG+tHGEU3SDjcTzk0FefmSHsQ5XoUtsgn+Sy/+ AUZ/PvlvAR1j7yAVUekD6MQa8LgONpeLn4+eFc0/C6k8MEe9kkHhFHPeu4ooFTbA == X-ME-Proxy: X-ME-Sender: Message-Id: <1534170704.3055908.1472497128.24A0E402@webmail.messagingengine.com> From: Daniel Shahaf To: Pier Paolo Grassi , TJ Luoma Cc: "Zsh-Users List" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-9a5384d7 Date: Mon, 13 Aug 2018 14:31:44 +0000 Subject: Re: separating functions, fpath, and autoload In-Reply-To: References: 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 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.