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 9377 invoked from network); 23 Jun 2021 23:34:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Jun 2021 23:34:41 -0000 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-Type:Subject:Cc:To:From:Date: References:In-Reply-To:Message-Id:Mime-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=4nZ+0wa83MvYfpkZoj/QESAqrcZZqqUOvr6GpVsVluk=; b=nuojnXfZuHm+uode8RP0Jc8HyE wphk9ExoTPzpuq/U0qZwDE1TtSV7RNlxu/6RogC7EhdV/KDKFyXpeLJHrFnjjgcm+XhqsFW0eWbX3 WzJTrifGgjJQoYs8F0PxU8KuPvxLY0EeUjLR4uunkUxni+EAxwxSiyeaNpY/+VD343IiXUON80FKw rOXKi3AmrzsyonZXXOMONN5MSb+e08H4ISCj4aFXEiGD0I1yczpEUQHOq9rn10JALDXm5Ox/E2gP4 hNkA4rJJxsdGQ90oP/HjzpPL3jkhPbApYBaxe9gZFVYaH9oYMXuKiVBOENvYz6LVYnJPoX01vc2K3 vswKVdwQ==; Received: from authenticated user by zero.zsh.org with local id 1lwCOE-0001W9-2v; Wed, 23 Jun 2021 23:34:38 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lwCNv-0001EG-RR; Wed, 23 Jun 2021 23:34:20 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 1117327C005A; Wed, 23 Jun 2021 19:34:14 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute3.internal (MEProxy); Wed, 23 Jun 2021 19:34:15 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeggedgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderreejnecuhfhrohhmpefnrgifrhgvnhgtvggpgggvlhojiihquhgviicuoehlrghr rhihvhesiihshhdrohhrgheqnecuggftrfgrthhtvghrnhephefgleeludefleehtefhhf eikeekvddtuefhtdfghfeihfetvdejteevheeiudelnecuffhomhgrihhnpehsohhurhgt vghfohhrghgvrdhiohenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehlrghrrhihvhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidq udduhedukeejjedtgedqudduledvjeefkeehqdhlrghrrhihvheppeiishhhrdhorhhgse hfrghsthhmrghilhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 34FBCA00079; Wed, 23 Jun 2021 19:34:14 -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: <574e66f5-0e51-4326-9cea-7335eae49741@www.fastmail.com> In-Reply-To: <9c56f50a-d061-4175-958a-6f89f6bae822@www.fastmail.com> References: <9c56f50a-d061-4175-958a-6f89f6bae822@www.fastmail.com> Date: Wed, 23 Jun 2021 19:33:53 -0400 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Daniel Shahaf" Cc: 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 X-Seq: 49106 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: 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#Special-Widgets, > > which says nothing about return values. > > That has two possible interpretations: > > - Hook functions may set $? however they want > > - Hook functions should set $? to zero on success and to non-zero > otherwise > > In favour of the first interpretation is that the manual's language > doesn't explicitly rule it out It's worth noting that the "Hook Functions" section, while not saying anything about ZLE hook functions in particular, does say: 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. https://zsh.sourceforge.io/Doc/Release/Functions.html#Hook-Functions -- vq