zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: Compinit tries a filename once
Date: Wed, 27 Jan 2016 15:00:49 -0800	[thread overview]
Message-ID: <160127150049.ZM6555@torch.brasslantern.com> (raw)
In-Reply-To: <20160127164312.029d0cd0@pwslap01u.europe.root.pri>

On Jan 27,  4:43pm, Peter Stephenson wrote:
}
} The points I'm trying to make are (i) <somehow> needs to be the same
} in both cases for consistency (ii) in normal operation, the autoload
} has a very simple, builtin rule for <somehow>, deep down inside the
} shell --- grab the first file you see --- so compinit needs to do the
} same (iii) if you want to do better, you need to arrange for some
} more programmable form of <somehow> to be shared by the two.

For Sebastian's purposes the most interesting bit is the handling of
the #compdef or #autoload token as the first word in the file.  What
he actually wants to do, I think, is invoke just that part of compinit
on an arbitrary new set of function source files discovered at plugin
load time, which may be after "compinit" has been run.

"compdef" itself is already defined separately as a function (in the
course of executing "compinit"), but the #token parsing is part of the
body of compinit and evaporates when compinit unfunctions itself at the
end.

This has now become a zsh-workers-level topic and should move to a new
thread over there.


      reply	other threads:[~2016-01-27 23:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 15:51 Sebastian Gniazdowski
2016-01-27 16:21 ` Sebastian Gniazdowski
2016-01-27 16:43 ` Peter Stephenson
2016-01-27 23:00   ` Bart Schaefer [this message]

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=160127150049.ZM6555@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).