From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3667 invoked by alias); 27 Jan 2016 23:00:08 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21191 Received: (qmail 21281 invoked from network); 27 Jan 2016 23:00:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=yXKB+jgwzf0RjLQ59nCz/lMNj6CHIh7Q3X6W5qdQK3o=; b=MSfD7VT7TWVt/LLBuDftTZuSuHlf5aEXcpWQP7/Tie56brcRgVvTSECygMP4fNucu/ yLlPm8pLUGhNgdQyXOhK6wG922r5cL4xwLYBMbpkwDw+l9leFGHSlBSbsYH+6rojT4fy y5O+5OiBTsGKV+ug4wW07avu6kdos2SKpRIOOpGqFoqxxdWCtBrlY1w+9VzTC1FkV5EN D+LLqHiEZEDp/r+Mu46JodfUmugEsmxhIMz01EmPDhUb+t2LZtlpO8qLu/N/rJ/8kSbk JEjn9s/3veo/qfECVnOGxPKWOrcu0AANLBWSpUvh6YxpkPgNTYhbynWbXHRG8Kk9m0GW uaxg== X-Gm-Message-State: AG10YORSn5gSU8GxLzgODlOlkkNXvDkABgHWp13SMvsAJU9igyiMPICTlIewrArUV6Aecg== X-Received: by 10.98.32.194 with SMTP id m63mr45833856pfj.27.1453935605010; Wed, 27 Jan 2016 15:00:05 -0800 (PST) From: Bart Schaefer Message-Id: <160127150049.ZM6555@torch.brasslantern.com> Date: Wed, 27 Jan 2016 15:00:49 -0800 In-Reply-To: <20160127164312.029d0cd0@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Compinit tries a filename once" (Jan 27, 4:43pm) References: <20160127164312.029d0cd0@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Compinit tries a filename once MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 27, 4:43pm, Peter Stephenson wrote: } } The points I'm trying to make are (i) needs to be the same } in both cases for consistency (ii) in normal operation, the autoload } has a very simple, builtin rule for , 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 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.