Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Compinit tries a filename once
- X-seq: zsh-users 21191
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Compinit tries a filename once
- Date: Wed, 27 Jan 2016 15:00:49 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=yXKB+jgwzf0RjLQ59nCz/lMNj6CHIh7Q3X6W5qdQK3o=; b=B9b0kirojH3gnqMDldzcZJZ8ukl57xFfnreIr1BCQiKMhffPRxs3JU08p+b9p5xJoH nqEQKuyXSWiV8BALNGtQuoyXSiwhXFcVZqaFNQ8vw666q0Dr1ac3uwkHNUX21r1CcLGW XOOd00804c7PvRGiAxzLEKqnjp5w0V0BeEhiR/3wYlWyNBN/hLAW5ZouTjK1pYKGf+AM w+aXFgGeXz3suV+cWtqN0S5nsMaWd1ZB3QmgTNoBdtdptuECu3mUyRfhQg/Mh8QWikTW 9sbC83w68Utc1VlRJ4AP6lO2AU2J+NqmQO5q2NMgtniGa2sIU1eupvHTauMEgAITXrzW w7RQ==
- In-reply-to: <20160127164312.029d0cd0@pwslap01u.europe.root.pri>
- 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
- References: <CAKc7PVCe_QEgBKf8Z7FqLkLfuFLTMV4p-V0dfzsPNOpXUw3YNw@mail.gmail.com> <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author