Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compset -q appends the match after the typed word when the quoted word holds \"
- X-seq: zsh-workers 55249
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Yufei Pan <discodization@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx, Yufei Pan <pan@xxxxxxxx>
- Subject: Re: compset -q appends the match after the typed word when the quoted word holds \"
- Date: Tue, 10 Nov 2026 20:20:24 +0100
- 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-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=C+pQgBs+Hs6zXAPNvTqTYp7J0q5hZTZfFDwlWh7YwNY=; fh=bytPcqtKr0iEPhS8muJVtq1FrAtVTNFVpNWujAn4Hrk=; b=PwbdYOS/WKkfnouPcsruGKuXgUhjcNB8z8gVDlQMwrHjMNw1S5aUx2AzCPGRkrGgX4 vdOEwmAqVI/Uv8jEPzi4jrgLKsh7QqtdjcjYlr7dH/ZMUwVpvwsOZ3Fo9Gv/S+76oOK+ Q2EqhM3/DwBHUs69mgsBD99z/VhmOmsaiVpvRtNSVP7ByecdKr2BNz0ftPv7KdPvUzVU Mp5oQSKgkT+VJpA4Aoi6DYMa6iCxtWknRojpfJ8nOmO+2T5Ehua2S+Ldg3u/s51nkgPg /ufzoFGjFpbOZdDJIFN/AWKx+V3quT+nBTnaKZ3VA3o6DJqhx1u6jO8gKgSeoYWzYFmK 9keA==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1794338437; cv=none; d=google.com; s=arc-20260327; b=CNAvZJnCu9edfmJ4vgHixvwR3eA415TiIuXCjFrAMkhgYX144KCrvPPJut7eVC8GXi bRgN69/hgXZBpbwK4UEYJ3aVbpoTSJK561K9UeYaXNwiSFboGbN1TDYBkGKuQ2PqEtRk Z33mCvvWxYpmLM5gRtRZfsUyp+sMQKzgZKMok/EPHteudubL8O0Pb4x1mmwQkKxtPZV3 bujRRgii16Mn6j4+JetHa5qRzWnMMwFYzTJhiO8iToWMxEcnQZuh1hLfPwScGFhac2QT y1C5IG57z2bA18VIzlr/H8crNbD6yBzynR1iZxZn6FWCK7hW8HmUKLgohvANVEBR/JSV aFNA==
- Archived-at: <https://zsh.org/workers/55249>
- In-reply-to: <CAP=Ow3cwZEvvmcKUbdWxyWwsj5YyY8DDVfzmgxRdz_GJAkpcgA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAP=Ow3cwZEvvmcKUbdWxyWwsj5YyY8DDVfzmgxRdz_GJAkpcgA@mail.gmail.com>
On Tue, Nov 10, 2026 at 10:46 AM Yufei Pan <discodization@xxxxxxxxx> wrote:
>
> Hello,
>
> zsh -f
> autoload -U compinit; compinit
> _zzq() { compset -q; _files }
> compdef _zzq zzq
> touch zzfile
> zzq "cat \"\" zz<TAB>
>
> gives zzq "cat \"\" zzfilezz (expected zzq "cat \"\" zzfile ).
>
> Also zzq "grep \"a b\" zz<TAB> gives ... zzfilezz . It is fine
> without the escaped quotes ( zzq "cat a zz<TAB> gives zzfile) and in
> single quotes ( zzq 'cat "" zz<TAB> gives zzfile).
>
> Seen on 5.9.2 (Debian unstable), 5.9 (Debian 12) and 5.0.2 (CentOS 7).
>
> I am not subscribed to the list; please Cc me on replies.
The current compset -q is horribly broken and can't work in the
general case. I tried to rework it a bit a while ago but I felt like
the abyss started staring back at me. The current expectation I have
of the code is basically: be happy it works when it does.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author