From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24281 invoked by alias); 18 Sep 2015 17:15:13 -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: 20587 Received: (qmail 6857 invoked from network); 18 Sep 2015 17:15:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=E1OYC06BBXagvfji95qqY65DNTNdPo7gf2Z+29O131A=; b=SoZfRaKIr11TYwMrdfLObWm8MyBJ65pLMI2MHE989VkRp229ahEfsykMc1KmTQygMp 7eBxxKseGTWuLJv0lFAoXGsRjc9KmpfWdHH3WxZOc/21i+niJk50es14FMhR4EJoCYiY 1mzOS+s/9M++lgvQ/hIiRfZZSghomSUvumL1F8z3gLU5Ssb04XbNQZzTLiLNQ0n02+x9 vdPNAxTuXwAiRAmXl75d5YuaC8BAkLjESvl12YtQwhJ8OyLsUaTrHOLxpnQnPNY6M9il Mk+rwKYjlz6Jazf1iTtB6uwDecNJXhxcSCu3Ym5RGhKgRYeRtwjjOasRpYQO+3nw/RcK jfkw== X-Gm-Message-State: ALoCoQm1PlG3PPEVX3nm99QaJXzZm9YsFxMU7Jhlsz+1pUOIH7Q+ttqAhV23g3HoKJEgik0VCmkG X-Received: by 10.202.3.10 with SMTP id 10mr4092513oid.127.1442596509989; Fri, 18 Sep 2015 10:15:09 -0700 (PDT) From: Bart Schaefer Message-Id: <150918101506.ZM26893@torch.brasslantern.com> Date: Fri, 18 Sep 2015 10:15:06 -0700 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Autoload vs regular function" (Sep 18, 8:34am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Autoload vs regular function MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 18, 8:34am, Sebastian Gniazdowski wrote: } } are there any pitfalls about functions declared in this way instead of } using autoload and separate files? Is this enough to have plugin for } e.g. antigen? There aren't any pitfalls to this, except that the file has to be sourced (i.e., all the functions fully defined in shell memory) unless there is a single entry-point function whose name can be the same as the basename of the file, and thereby trigger loading the whole thing. E.g. the _git file that handles completion for all the git subcommands has a whole slew of helper functions, none of which are loaded until an attempt to complete for "git" is done, at which time the _git entry point function loads all of them.