Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A ZLE widget for calculator
- X-seq: zsh-users 30468
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Erik Wybouw <erik.wybouw@xxxxxxxxx>
- Cc: Vincent Bernat <bernat@xxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: A ZLE widget for calculator
- Date: Fri, 27 Mar 2026 16:49:26 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=u8aGY8AChY53LDwrkBMiGOKLXMTgFXw3kRTjV8+CvTw=; fh=6G0iii1ZC9Rkx/Pjgo3OBUngXWPedIKwD3VNGlKgxbM=; b=D0S/Ygg+xK6TsRP6fHmI3gEWPGG2sEI3OwG2uFH5YbQOjgk9TYzkxXgVuqqAFMOCpy lcSQAi4oJnCtF/rSS0poZqiAdx3F/PZShb0O4LNE/aLf4Yq1ajjdrgbVDX3cSbaBMSXP SiaaWtKAzgvWnmIiGebVr1Z9FTZhpUlMAe3soaL/bxmTmaUQjCVEsLhA92HL7LD9AnN+ +lRTjUdNRdYZbt8m0Jsf4ip38wuR8Z0RiGE6ET16imoJSq5IXVgWho20jyj0yx1fsZfO 51gCLvgFZX6NG8JH5rISnlKG0UEE6yDL3xZNvvejQ1JUU8R/m1SaM1st/HLCnKHQfwU5 kN7g==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1774655378; cv=none; d=google.com; s=arc-20240605; b=eOU5F+F/+UGZ9fl/oilLAL9+y7RPMRSSY/Pm9IkHG5jYXMgIZT2xHpygHQ4pkuRiUX 8mfl419yYChbuG1BxaFKm51MK1rh/Iupe6n0oKQee/R3VR0eQlUy+gTfHFusK215D09m b6ofLn0F/+rORStIEb2nTYDcMQcOUknQe6rRf4zsFrcS2mZbEGBt9CKTx+7WmIliBugu rtke8gggjjAtNxO+VzDcyC2QL0fkEQyfNWqvLT6FTofcNA+MH8cb4lK1qCSzVmYA4KZh 2PZOx6pGWg/LZQloYMg3L8YJUK1xKIiitwI02I7mMv/Ry6whjpXw4ZL8DvQZh79NbJfy /7Ww==
- Archived-at: <https://zsh.org/users/30468>
- In-reply-to: <CABPiPahLaS8Xn9n6ZjJviX6vAgbv1MThHWwsavB97kS=EJS4AA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <a1738285-db4e-4658-8148-ea694387e6a8@luffy.cx> <867657643.489413.1770121301447@mail.virginmedia.com> <d606df42-d003-42c0-b921-729575fec8c5@luffy.cx> <1992876564.527215.1770199206830@mail.virginmedia.com> <CAH+w=7Z6NMN8J1zO2yS6=10pLfOWXMs2GSyDJ3prH+gK0Z6fjg@mail.gmail.com> <7e666525-3347-4b3c-bbb8-4a2aad424225@luffy.cx> <07a43bfa-10e9-4354-80fe-32bab3b6eafe@luffy.cx> <CABPiPahLaS8Xn9n6ZjJviX6vAgbv1MThHWwsavB97kS=EJS4AA@mail.gmail.com>
On Fri, Mar 27, 2026 at 2:05 PM Erik Wybouw <erik.wybouw@xxxxxxxxx> wrote:
>
> Thank you for the inspiration!
>
> I just augmented it with a trick I use to chain accept-line handlers (my own, and zsh_autosuggest)
You might consider doing this with
add-zle-hook-widget line-finish quote_expression
instead. That's actually designed for chaining a series of actions.
It does execute after accept-line, but before handing the buffer over
for execution, so you can do most things you would otherwise do in an
accept-line override. The one thing it can't do is skip the
accept-line entirely.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author