zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <psprint@zdharma.org>
To: Zsh Users <zsh-users@zsh.org>
Subject: Ways of delivering code for execution
Date: Sun, 26 Nov 2017 16:01:42 +0100	[thread overview]
Message-ID: <etPan.5a1ad756.570c9efe.c73c@zdharma.org> (raw)

Hello,
I know following methods of loading a code for execution:

a) source file
b) autoload file && file
c) eval $(<file)

This is one of impossible questions that I sometimes ask. I'm wondering if there is any other method to do what a,b,c are doing?

If not, then maybe there are significant pros and cons of each method? So that it makes sense to choose between them according to specific situation. I cannot see any. source is just the best method and other have flaws.

I would add method-selection to Zplugin, so that user can load plugin in multiple ways, depending on what plugin does.

-- 
Sebastian Gniazdowski
psprint /at/ zdharma.org


             reply	other threads:[~2017-11-26 15:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-26 15:01 Sebastian Gniazdowski [this message]
2017-11-26 17:06 ` Ray Andrews
2017-11-26 18:17   ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=etPan.5a1ad756.570c9efe.c73c@zdharma.org \
    --to=psprint@zdharma.org \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).