Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Autoload vs regular function
- X-seq: zsh-users 20583
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Autoload vs regular function
- Date: Fri, 18 Sep 2015 08:34:56 +0200
- 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==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author