zsh-users
 help / color / mirror / code / Atom feed
* Autoload vs regular function
@ 2015-09-18  6:34 Sebastian Gniazdowski
  2015-09-18 17:15 ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Gniazdowski @ 2015-09-18  6:34 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-19 18:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-18  6:34 Autoload vs regular function Sebastian Gniazdowski
2015-09-18 17:15 ` Bart Schaefer
2015-09-18 18:45   ` Ray Andrews
2015-09-18 21:53     ` Bart Schaefer
2015-09-19 16:23       ` simple question regarding local variables Ray Andrews
2015-09-19 16:32         ` Bart Schaefer
2015-09-19 18:21           ` Ray Andrews

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).