Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] compinit forks less
- X-seq: zsh-workers 54426
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Charles Blake <charlechaud@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] compinit forks less
- Date: Thu, 30 Apr 2026 09:51:59 +0200
- 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=7NGzy5DvdjFAMdJKnCYTGwbOTG0QyF52JEVkqBO9CQ4=; fh=lNwkaVSUgCqMTMeZdgLy2I+b6F4zkEqzT0VbYWrffUU=; b=KWGGuOhVDSGo+7IupjJBS1bgEC4Bd8SaM07gmd9O748++EennY7XHigU44zQ/HUV+b KiBW8mbyP4D7sRFfmJhMEk0Uvg58rav1GfiopZC79wjrBg2Cd5AsnXIuCZ5A8zti07cY 3MrsEiX3QEHT0MAuau3v08MkYKgYIO4TtnBu+/acaT0vbFxBpf7+SIMew6BnEVmFj3bH 6B718kXzNXvFp3Kx2gD59VwrPKBz/U4oZ85WPpVer/Qul/3jVDLcveKeELwchbJdY2q9 3cIb6n3gpuRziG8jrNu5Uvi696ByMzhWr3Op+etRp9FHgly4Z8wg/s5Q6MQeekkHJWYt vebw==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1777535532; cv=none; d=google.com; s=arc-20240605; b=cxcGikO+360wfQgzzJ9oL98OaFBsna+1s/rDjtvB4A2ECxgbycip5QA+srb2/d1Kwr ruYz2fcA8+H66TgfkmxEv7MegjqIdDbfAAstRuFTOjcTYn51UkLJWihfgZPnjHKvhSNP qGXjW8OUi1lhKPo+F9XzEM+ERzfzsqNkhBs1QyfW5y7aFBpiJ/czl5x3yo2dyhsTwVT2 UBdzVHVPPG5tvqTwuKPDdI2NLzeYj5ST+BBt0mGswLgryhYSN5aPzXPQ36ESGlJRKARn CBAcB3VuD9YITywXVK9OGC6rFPyz2T/Ru5hlb6mBSFL4BB/9vnXDfTmFQEEBmF93Mg/f QJOw==
- Archived-at: <https://zsh.org/workers/54426>
- In-reply-to: <CAKiz1a_X09-MpXhOwtD2H4tykBi9HTkLq52Xirc25WHXsmjn4w@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAKiz1a_X09-MpXhOwtD2H4tykBi9HTkLq52Xirc25WHXsmjn4w@mail.gmail.com>
On Thu, Apr 30, 2026 at 9:22 AM Charles Blake <charlechaud@xxxxxxxxx> wrote:
>
> This patch to use non-forking command substitution with a here-string
> to analyze `bindkey`. I've been using it a while with no trouble.
>
> Admittedly, a new zsh/zparameter $bindkeys associative array would be
> nicer still to introspect key bindings (rather than parsing piped
> builtin output). That's also more work and the way of this patch
> also helps show the new non-forking command substitution if there is
> interest in doing that.
Such an array would have to be in the zsh/zle module since that's
where the data is, I think? Either way, I'm not sure what a parameter
api would look like to get the key binding for a specified key in a
specific keymap (two different keys)? Maybe some silly shenanigans
with namespaces, like ${.zle_keybinds.emacs['^I']}, but it also
doesn't map super well to how many different ways you can specify that
key (C-i, ^I, a literal ctrl-i byte, etc?).
Anyway, the patch works for me too, and I checked with strace that it
doesn't fork just to make sure.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author