From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25273 invoked by alias); 28 Jan 2016 23:22:49 -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: 21198 Received: (qmail 20164 invoked from network); 28 Jan 2016 23:22:47 -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=1NzL/tvm8mCZ2Z8k/WzaQ95PSFU+939HPIqe6mA//BU=; b=uKjnWhi9+zeXycYFZxYP6HEoBkM/+yq3LOdJDfvos2gXT9/cVqnys8ZsL4+OGtOMv5 F3aRxmtuXM6Wf2HaFq+Hjo6rIJnjWDlS74yLsFAB3VEjYteQMwRBTCTGawgARX82XF0i oK3In0xBo5QhorYHxl73LU7sJjKlTgTtaQy+RNFvi5g/U6e0EjD2c0tULe60e/g7hLr/ fBsoBQ/hS4qMTQJa/l0r9StHlDNkyefTjSE3O3DguhEn98zq/cmYstkqRShgbChbdp3Q 1JepXdEBEMDFboX88dNmOy3t1DsuqfvgV9qGAgWIcefa+WgrlulSX6Yap/YfVMX5YGdX pm/g== 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=1NzL/tvm8mCZ2Z8k/WzaQ95PSFU+939HPIqe6mA//BU=; b=ERO6W6HrSmjL8mdTn1KaSpVsSiC2VaVvJs0Y5UCBo1+VNLunTfgMgWpurp/jkDlVlo 3yMPAf3Kp1V7nUZqBXMtLRL3jfRwild/psEjyN+kf1zTOBqnDrbpyCRZo0sBaR33Uy03 rG2cpP8Ad5+/fT8xh3VmksicW75T4Oy56p2PG+V7x/TVWfLQ5vB3QwkLISsahsTttert YyLiX+OpekvHU56XBUcJNTQLPeyyJCUfArtRuYxPrhRUKK+mpJmXbpHxyRGVzBHOOAf4 WBRxrZvLbtFNv/CElvsXZ8d61i6LHAsHw2cnkShuU3INlmPablBkXJLReXVW19tddNie 8O1w== X-Gm-Message-State: AG10YOSloYQzY0NtgBT+yb2mAX5zrslWznfRNZi+7W+7lppWon2FjaWcqqj11zIMD05w7g== X-Received: by 10.98.76.19 with SMTP id z19mr8657231pfa.78.1454023366043; Thu, 28 Jan 2016 15:22:46 -0800 (PST) From: Bart Schaefer Message-Id: <160128152332.ZM20837@torch.brasslantern.com> Date: Thu, 28 Jan 2016 15:23:32 -0800 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: How completions work, do they require fpath?" (Jan 28, 8:39am) References: <160126232017.ZM3789@torch.brasslantern.com> <160127231104.ZM17647@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: How completions work, do they require fpath? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 28, 8:39am, Sebastian Gniazdowski wrote: } } PS. Without compinit, compdef isn't available? The compdef function is defined when compinit runs, yes. The upshot is that you can either: 1. Put your function in a file whose name begins with "_", add a #compdef line, put the file in a directory in $fpath, and finally run "compinit" 2. Name your function file any way that you like, run compinit whenever it is convenient, put your file in a directory in $fpath or load it some other way e.g. "source", but finally add your function to the completion system by calling "compdef". The intention is that #1 is simple and can be rubber-stamped for every new completion function, but you always have #2 if #1 doesn't work for some reason. Either way "compinit" has to happen to set up the rest of compsys, so there's no point in defining "compdef" independently.