From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9266 invoked by alias); 18 Feb 2018 02:10:20 -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: List-Unsubscribe: X-Seq: 23143 Received: (qmail 28008 invoked by uid 1010); 18 Feb 2018 02:10:20 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-f182.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.192.182):SA:0(-1.9/5.0):. Processed in 11.060173 secs); 18 Feb 2018 02:10:20 -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,RCVD_IN_DNSWL_NONE, SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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=MQfoVJJodRxKZO1z/hKorPCX4PGicgy8YE92+4AIeC0=; b=YP5LpQMQnT5qGYlQZ2a2ySeEA/Mu2AJXxzDQ0QecyCR49TDwE0cikB8PPmL/qIHf9K 2mMwUCK4haJ4ETb/HOUQIEkPhiV6sNDII9i+lmlC9p4JMmpzigLCd/oV86+xavVvZIyV WUZD9W9rY24e6NItpkRGPp4FrU7l/ZQE8Fsn0cb7wvKzoWGQ/+uvFVmNMFUi+UWvGpDr 6PqERHrZOFv+KlrgNo+2s7njJHcfgf1TtK622YVxlNSeBCkTvYBcoSgiFWcS0SPuFiAh Zpu3UN8G62RzpiuRHvbokW4HKSl/7ZFG2nU1AVUUYle/O7RGYjvkyxX0H+1IYp+xb+1c eyqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=MQfoVJJodRxKZO1z/hKorPCX4PGicgy8YE92+4AIeC0=; b=p2uiN8VxOYwFc6/rd/LjM1kL07wHEtzf/l861VbF5on5pW/p2HUw5Hy01iuwQHhoMo 8Y2VYKHvol68OdaZTLwyQTVPC6CRG/s6zDPXdhgjTBSbOtgvioF/uLCO7ApP4icGnf3l B8zWlRxHePxlYQIYkDKj9zHszRqGBeznAzcOHTGRXYHMFODXedyVpQbI3D4eSl9rtYZC j2UjhbXr72IKxBDyr4bT/sQclbfCmZoFkcUFi0Cgr4y/2J2y5ErCqnL8t9fijcs045kl 2gZi+n7kLrpgdrfTPFKa7wlZ/UHxsprVJs/u9nroN1j5QmbOTuwhTi3SG5CKg7A9LM9i CKpA== X-Gm-Message-State: APf1xPA8ecw9nuqPh/Nw64I/vi3rMxHyqIDNZvreJc8ZLGkou6yRQhhH zV9sF3ThxpiGo/x/VsjyNcyDgxEY X-Google-Smtp-Source: AH8x227VOwESlJeLG/taS7l61pgOxzEHAbP9R9MhctVNCActaIg4gQq2vIAU1BDcHA2Pp7ipnEItLg== X-Received: by 10.98.64.9 with SMTP id n9mr10574079pfa.194.1518919805513; Sat, 17 Feb 2018 18:10:05 -0800 (PST) From: Bart Schaefer Message-Id: <180217181002.ZM27805@torch.brasslantern.com> Date: Sat, 17 Feb 2018 18:10:02 -0800 In-Reply-To: <05e4360b-4989-af2b-70b6-79c2aef06f95@eastlink.ca> Comments: In reply to Ray Andrews "Re: alias hygiene" (Feb 17, 4:17pm) References: <1679a1e0-f716-e501-c4c2-f7e485f9701f@eastlink.ca> <1518827410.2159479.1273706656.1F5B436D@webmail.messagingengine.com> <37bb7b6b-ad70-6d03-f979-0e0d3b0be4d3@eastlink.ca> <1518875676.3562728.1274073304.5ED24DC8@webmail.messagingengine.com> <20f1c297-7c7d-109f-b9ee-b53823aa476c@eastlink.ca> <1518881445.3606980.1274127384.7D7A2004@webmail.messagingengine.com> <05e4360b-4989-af2b-70b6-79c2aef06f95@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: alias hygiene MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 17, 4:17pm, Ray Andrews wrote: } } That doesn't sound too terrible, not some actualnew construction? So a } function can be a widget? Sort of. A function can be one component of a widget. The other parts of a widget are the bit of zsh internals that explains how it works in ZLE, and the name used to refer to the whole composite. A "user-defined" widget has a shell function, those internals, and a name. A "builtin" widget has C code, internals, and a name. } Show me one that I can understand Daniel tried to do so a few messages ago, in users/23134. You create a widget with either "zle -N" (which sets up the internals for a "normal" widget and attaches the name) or "zle -C" (which sets up internals for completion and names it). Once you have one of those objects you can use its name in "bindkey". } When would I call } something a widget, not a function? When it's associated with ZLE? Approximately, yes. Most of the time it's convenient if the widget and the function that implements it have the same name, but that's not a requirement; for example, many function that implement searches or line motions can handle going both forward and backward, so there will be two widget names but only one function.