From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21384 invoked by alias); 5 Jul 2016 21:01:16 -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: 21734 Received: (qmail 20951 invoked from network); 5 Jul 2016 21:01:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) 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.1 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; bh=OKKheFjvEJq8vhhlGvPQeXLYI+OutM8evUHBqtbRhBU=; b=kUmd/OZu8NacXcVNVO48gGTnpgdVKOe4iiINQd12FoRCZKNIQ9cz5lbSZQChHKSDtn sctUlCqI37wfNuCQveRucaLPoIVKOGdxWzJyWUY3tOKhvxSPZbhwkkjSuyUqw49EeZ90 ZU/aKGMEWOT18SwvcvCSTVulvFnbGeABrRUTat9Qat28ZAVlYC9riFsSplPevLQyISxZ pGtQf13vmp7S/bA0OZdJlb1S4Q+ep0GsQto7T7qHtI8FAfQ/aSse97VOIhjr62zxemzs UubIueQuaVVF57ANHcQ8/LQ8o/HK+BRxVIRxonQda7oa/qvnagRh6EU+ysqaidcLsz2v wsKQ== 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; bh=OKKheFjvEJq8vhhlGvPQeXLYI+OutM8evUHBqtbRhBU=; b=BwqhKShe+or5y7C784epc+9TJAbIyuVORPI8YaKkOmx3jFy7uYIdMQJnMGsqzV1d+T 8DZndh5JPLSMZrI2+3X3M+xX+D7Oi3/00zWR9oBbzNJRPHFvAI/HpRn4WKSKsRLraUL5 6AX3n0qALVKB2E0pbzu1OkOTnXw/xuMHifn698x2t1HMhoxl4AedJB76rQIBcT9ewh2o qLbauUuw6oXwFWsr+hYqSqEs+Lm9JjuD7K5dK9WU6Fse0nFaCUu8a+3lpdxmAENGYQZr 7vADPUPsOWhIzjhTmsCE3vGcv7zahRYIRbWQqyVFfQ0LavhWUirhBnqwqMxFcrqDCy52 hkow== X-Gm-Message-State: ALyK8tJsI3TswIIgayCETn5FOz7ZQofvRwzb9cTxqKM6rLAnVLZdCtZWaeKGDOkjY/q+eg== X-Received: by 10.98.16.156 with SMTP id 28mr36409964pfq.82.1467752472218; Tue, 05 Jul 2016 14:01:12 -0700 (PDT) From: Bart Schaefer Message-Id: <160705140120.ZM17175@torch.brasslantern.com> Date: Tue, 5 Jul 2016 14:01:20 -0700 In-Reply-To: <20160705045758.GA18441@tarsus.local2> Comments: In reply to Daniel Shahaf "${(k)widgets} v. 'zle -la'" (Jul 5, 4:57am) References: <20160705045758.GA18441@tarsus.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: ${(k)widgets} v. 'zle -la' MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 5, 4:57am, Daniel Shahaf wrote: } Subject: ${(k)widgets} v. 'zle -la' } } $ zsh -f } % bindkey zzzzzz foobar } % zle -la | grep foobar } % print -rl -- ${(k)widgets} | grep foobar } foobar } % } } Is it intentional that 'foobar' is listed by 'zle -la' but not by } ${(k)widgets}? I'd expected those two to enumerate the same set of } widgets. It's actually the other way around, yes? It's in $widgets but not in "zle -la"? } Observations: } } - The manual speaks of "all existing widgets" for the former and of "all } defined widgets" for the latter. ("the former" == zle, "the latter" == $widgets) That's not quite what the doc for $widgets says, but in any case you're missing the crucial bit: "zle -la" lists only USER-DEFINED widgets, wheras $widgets includes ALL widgets. In your example the "foobar" widget doesn't exist yet, so it isn't user-defined, so "zle -la" doesn't show it. Now you might argue that any widget that isn't a builtin must be user- defined, so naming a widget that doesn't exist should cause that widget to be listed by "zle -la". However, you'd be forgetting that zmodload may pull in additional builtin widgets, so there's no reason for zle to presume that "foobar" will eventually become user-defined as opposed to becoming a module-defined builtin.