From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13348 invoked from network); 24 Jun 2021 00:10:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Jun 2021 00:10:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1624493441; b=i6mmJb6hD6JQLgKjiMksJp7J6oYxpRqodsyFgbyHhJQ0sBDuw3yAp7V7IZiumk6T+GOJ+2kbgE OyGd/2Bl9S7NRNASSmEjAgG6mgMCk/jqsX400diAoALjlUYeW/IvXvBIJdmPGS8JmersdUHSdC biQ9PSwXQ4MVZhOOfyniCJEOYfaCgDykezeUIqan+xPnsdC7eqg0+CRjOl02oN9u0sih997jq0 h/IyHYTg9b4sleB0NDNvL/CIum0Jv8/Gg9gE3vCeNQd5d3aG3uSJclqw4t/21+cXLvy6akLRhJ wNl1Li4aOwIGjaioKF5P8pE8yzT11Ov6pN6ksidhOAv+QQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout4-smtp.messagingengine.com) smtp.remote-ip=64.147.123.20; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1624493441; bh=da6ykXpmz7FF0vIQMTGP1N37YxI2ooefX/wF6tnugrA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:To:From:Date: References:In-Reply-To:Message-ID:MIME-Version:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=qR7b4AZ+mo3GLxcaXheieQ0YmPXK5I1z7Dzw+uSreMUJK/ojOLOhuM/TVBYccIW585GdatlKVh Rk+Yn8sxD02AaTL4K0ylO9MSwl3zx63kfUDMN24pw6jXf3PuaXzn6s7TCW7skeEBiJF3a98xFi 4nJG3wF7Z9OO0wBwdTTsr5ZYbOZ3GX4wfCtmS2hcIsM/rFdonsksoR/xE6pwOiFEMVRBcANYxZ MGTWL/zT+RY1yne4NiMAkNftSO/PHBT2xg5QvD40KnPnoL2+TSJXKuRxkDpSeOm0wfQqG/jtbY CT4kNW/Cqlm2pL+0pzYkJYBnIxZh13nwPF2bymLEsGY7OQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Subject:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=vHwQTQKwNGon3hXqpv324HINFsmTnGYfK9r+rmZIauU=; b=jAjlkiPSH01nXRPJpcSejahGD/ eMQxmxAgcfEZPV9YYxxCyoX48IaYQKfGJxbvIfQtDL0Igt2KJmKRKn/+Z1Npv0sReiPQmwLoGrgr9 TvhULZBwFrZFua7kStj6vgPwotZ1crmGMVeAOX+tGCO3jLjsoPev9sOPzrPtwWTeTXSQAMS8P16nm zfr3f9hhdUcipBegxWUMkg0BXCWPULSMns10RlIzdm9s6U2U77tERxFyCA/7Sa/iSeM9wHfQLUHV4 J7hiYFC195XfVip2SM1uF4Z74NF70P5fdR0bvPEcrt8FN+JLdjWVfATT/BUIzz4HKWlR7Ob9xMDL1 fxmZK14w==; Received: from authenticated user by zero.zsh.org with local id 1lwCx6-0003ST-8K; Thu, 24 Jun 2021 00:10:40 +0000 Authentication-Results: zsh.org; iprev=pass (wout4-smtp.messagingengine.com) smtp.remote-ip=64.147.123.20; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:37999) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lwCwT-0003A7-AR; Thu, 24 Jun 2021 00:10:03 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 093F32699 for ; Wed, 23 Jun 2021 20:09:58 -0400 (EDT) Received: from imap37 ([10.202.2.87]) by compute4.internal (MEProxy); Wed, 23 Jun 2021 20:09:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type :content-transfer-encoding; s=fm3; bh=vHwQTQKwNGon3hXqpv324HINFs mTnGYfK9r+rmZIauU=; b=U6ARX7Bt/20YMPBkpbnAU/xugCfg32Y6rQ12sk/sol 1Av6pB2bHm23255cEeciYJmsrv3o07phMveXXuF/1J5X1rK4y6ldey74BsMkGbda 7rkUFclrl4XXXGhhbrKiGCGncbfPp+qf0J6P2MQZ9cyH1hm4O5jkDMm+oBpto10M h/gJTYKuhv3QO1blAcjx9NzFI+4/dA6DIH3B9xeypCmpVDyp44i3qHf1SxcaXiXX UmJ4cjYDjtsdKcfoZtjDfwPt94CUZZ6q0jyVdlvb/izDdLxn+sMTIBgWUJgOqgZW uvKmJnZ9NXwJMKMUOMjqYzNO/2W+YmJcDft7OxBRZYdQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=vHwQTQKwNGon3hXqpv324HINFsmTnGYfK9r+rmZIa uU=; b=tJhk7EdEfN2kRtLCu99dKCbke51/uUYu7oF9C+IFkjzpgeEmirzRNnqFJ SKrdz+qOPfrxXcJSOf4WZChbVchsPw6OoRz9fQ4wyphC2ro4PgHyXvATKb5tQlgu HIa5RFvtkMswPt/wMi3altfx/ZvOC4aCgrMIeF33N76gdgAvEmbL+pAs0BuAO/xt Bl2+cfC8EDoEE31Q6oIhgtZBEGgjDfqWCd5fJtnv6yELjHTclPFIu0NOgOhldUNh Tib/a2Gjx3fHv7Ko05IEcRHUA/8Esq3vcHmxLe8F4KVJJmlr5/WOlXyEdk8/IaX/ llSGv6YenvjhqA9KJTMGTU6GmYKdw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeggedgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepfdffrghnihgvlhcuufhhrghhrghffdcuoegurdhssegu rghnihgvlhdrshhhrghhrghfrdhnrghmvgeqnecuggftrfgrthhtvghrnhepvdduveffve fhfeegtdefheehffegfeeikeelveejvdefffehgedukedvkeelveegnecuffhomhgrihhn pehsohhurhgtvghfohhrghgvrdhiohenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 43AFF6B4006A; Wed, 23 Jun 2021 20:09:58 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-530-gd0c265785f-fm-20210616.002-gd0c26578 Mime-Version: 1.0 Message-Id: <6fb18ce2-d4f0-4bf4-a450-25255178683c@www.fastmail.com> In-Reply-To: <574e66f5-0e51-4326-9cea-7335eae49741@www.fastmail.com> References: <9c56f50a-d061-4175-958a-6f89f6bae822@www.fastmail.com> <574e66f5-0e51-4326-9cea-7335eae49741@www.fastmail.com> Date: Thu, 24 Jun 2021 00:09:31 +0000 From: "Daniel Shahaf" To: zsh-workers@zsh.org Subject: =?UTF-8?Q?Re:_Does_add-zle-hook-widget_violate_the_contract_of_ZLE_hook_?= =?UTF-8?Q?widgets=3F?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 49107 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Lawrence Vel=C3=A1zquez wrote on Wed, 23 Jun 2021 23:33 +00:00: > On Wed, Jun 23, 2021, at 5:57 PM, Daniel Shahaf wrote: > > Marlon Richert wrote on Wed, 23 Jun 2021 20:30 +00:00: > > > foo implements a perfectly fine zle-line-init widget. It obeys the= > > > contract laid out at > > > https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Specia= l-Widgets, > > > which says nothing about return values. > >=20 > > That has two possible interpretations: > >=20 > > - Hook functions may set $? however they want > >=20 > > - Hook functions should set $? to zero on success and to non-zero > > otherwise > >=20 > > In favour of the first interpretation is that the manual's language > > doesn't explicitly rule it out >=20 > It's worth noting that the "Hook Functions" section, while not > saying anything about ZLE hook functions in particular, does say: >=20 > A function found by this mechanism is referred to elsewhere > as a 'hook function'. An error in any function causes > subsequent functions not to be run. >=20 By code inspection, the last sentence applies to add-zle-hook-widget and= =C2=ABadd-zsh-hook zsh_directory_name=C2=BB, but not to other =C2=ABadd-= zsh-hook foo=C2=BB. > https://zsh.sourceforge.io/Doc/Release/Functions.html#Hook-Functions