From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7480 invoked by alias); 27 Jan 2016 07:59:47 -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: 21184 Received: (qmail 2180 invoked from network); 27 Jan 2016 07:59:46 -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,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=PpXQNzN1EKCBuSsgcL6PQncy8nYoBVqNW8xycluERtE=; b=fpnotUsfex9Qt8b5Yjimvaac2Bri7NpMeBqtrvVn/f29kOQ7QDcW6nTwK8/1fsqTbn yRaR356fgSuB0QYOypCNR9aKwjfJ08rqfX/vD/nkeIuYbud17E8Vo+jX4xYpBxjWMx1T YT1SdvMoMoDO/ZM8UiWkgmMk60E0Jocjuow0BMHVvlzqicZRAsx/meTIQ4YpifyCv79L s9JGOX65UvAQAIW6r8MHiJW07mr70uFBmFBQelU4ddLg+uvU4uMdJxxPOzJS6CzhwH1m B90uVvPcaoTTC1V8Rcquj1KPmcMjAVv4nbDaCG31PlIGn0qQJYILcCAy7vmdCtfssF9v CPAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=PpXQNzN1EKCBuSsgcL6PQncy8nYoBVqNW8xycluERtE=; b=RTxsdf69jx0ju+Yc0cvlsczgCSTT3fHHve5TCm9p/eB1qv/n0mImf71nyp9+ojP2/G CZOHBlPonscuMF6h8uZZu1V2Y5WX1bbjKizJ33NZjvY6KVPetIZPvLyjBcickkgwbIuZ DAqMNfWe9eXSg2ubT8F6PSmc5Fcv6t53C8Zomm1vI8/mV8YITbkK5FS/+PSFi+Dx56wm T73i6Uf07KnJqiskadkp7LLKvX2bQBBM2R4jo4uEOGDm+is0Vw2qa60aHG59bNOhzH2U DXI0kSpkxZUydl5NN8hrc1ytClpWpVfJvKVSXjtXJUgDGw7cjdaCO/tFI3InwjDWDrpd HJAg== X-Gm-Message-State: AG10YOSWTKnZ6m6RYCppFXBIMUdKutjlYU5XCgOE3fggUgNRoDwZXAA2tNUYsii7aCweuCJ6YbE7XAe64vkUMQ== X-Received: by 10.112.199.41 with SMTP id jh9mr10325285lbc.125.1453881584474; Tue, 26 Jan 2016 23:59:44 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <160126232017.ZM3789@torch.brasslantern.com> References: <160126232017.ZM3789@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Wed, 27 Jan 2016 08:59:25 +0100 Message-ID: Subject: Re: How completions work, do they require fpath? To: Bart Schaefer Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On 27 January 2016 at 08:20, Bart Schaefer wrote: > No, it doesn't contradict the manual. The check for a directory named > "Base" is to distinguish "configure --enable-function-subdirs" from the > default configuration which is to avoid creating subdirectories. If > the "Base" directory is present it's expected to contain all the > files from Completion/Base/ in the source tree, and although the > explicit check is not done the directories AIX/, BSD/, Cygwin/, etc. > are also expected to be found within $_compdir in that case. So using _compdir would be a hack, and also, someone can utilize _compdir for what's it's intended, and overwriting _compdir would broke their setup. > This is NOT an indication that you can co-opt these directories for > plugins, nor is it "safe" to run compinit more than once with a new > value of $_compdir -- I'm fairly sure you will mangle, or misuse, or > both, the ~/.zcompdump file if you do so. So it seems that fpath is needed. I saw Peter's email (workers/12379) suggesting that work has been done to make fpath the choice for providing new completions. I wanted to have fpath "clean", and I guess I can still have it like this: create ~/.zplugin/completions, add it to fpath, simlink any plugin's "_*" files there. But this will broke if a completion uses autoload of some functions from plugin's directory. A very rare case however, I guess. Best regards, Sebastian Gniazdowski