Re: A ZLE widget for calculator

Peter Stephenson <[email protected]> Mon, 9 Feb 2026 10:38:42 +0000 (GMT)
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>
> On 07/02/2026 02:51 GMT Bart Schaefer <[email protected]> wrote:
> I think the attached does what you want.  It's based on the
> modify-$BUFFER + .accept-line variation because among other things
> that has the advantage of working at the PS2 prompt.  It
> unconditionally removes and re-adds quotes.  The original $BUFFER is
> saved in a global variable which is then added to the history by the
> preexec hook, after suppressing the automatic history with
> zshaddhistory hook.

Thinking outside the Zle box is a good way forward here.

I still wonder if we should have to jump through so many hoops.

pws