From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21197 invoked by alias); 18 Sep 2015 06:35: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: X-Seq: 20583 Received: (qmail 3521 invoked from network); 18 Sep 2015 06:35:20 -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,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=6/hFY5qgmDgO66cS80xnpH0g/YsYIVvlY6wQ/faCitw=; b=ajgp1cvQRR+s57HtRvO7w8FygQnRbcJEo9hFZTc38Sel+YkH8OeQpLzsk3VrhaErMA 7hhaXYcUTrWVn6OKxtvj2y2BPovHJFZDb4Gb75NMKJALyOzMVkQk6K+ot6douk6TWWhG UecQIcqkCr5rD88Yc8EER35E7eLg47oKWwHCXSFELEYKGQQaQdAS0psuc0R8FDYNlqPm lSWtybvDEPZPyYKjrdMpXLva0ggNAJJVC19/woT/atGf8302MSbfEYHWT8J/HF79dH4I 4fCRKwD1+9IWbvhZvAcT1EHTSIvRYnrQ9xjm9pwaBNNSsVpsT9CY3fMCv4fEvhV1KfYF 1vFw== X-Received: by 10.112.13.136 with SMTP id h8mr2341393lbc.23.1442558116011; Thu, 17 Sep 2015 23:35:16 -0700 (PDT) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Fri, 18 Sep 2015 08:34:56 +0200 Message-ID: Subject: Autoload vs regular function To: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 Hello, I tried to do the following on my series of autoload functions (their names begins with "n-" prefix): #!/bin/zsh local PLUGIN_FILE="znt.plugin.zsh" rm -f "$PLUGIN_FILE" for i in n-*; do echo "$i() {" >>"$PLUGIN_FILE" cat "$i" >>"$PLUGIN_FILE" echo "}" >>"$PLUGIN_FILE" echo >>"$PLUGIN_FILE" done to have plugin for the various current frameworks. In result the code gives file with series of functions. The technique seems to work, but 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? Best regards, Sebastian Gniazdowski