Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: fix crash involving backslash quoting in set_comp_sep()
- X-seq: zsh-workers 54666
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Petr Šťastný <petr@xxxxxxxxxxx>
- Subject: Re: PATCH: fix crash involving backslash quoting in set_comp_sep()
- Date: Thu, 4 Jun 2026 05:37:01 +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=9MlF2SnHyPNBNya/WP2kKKRTjMTgp1gfQj/BO0NeTzY=; fh=+0c4g9HrRWUjjeOx25ffoSd4+kwAEKEw10VLAEZRMF4=; b=KZUIL+tKVBdYXQe6suP178UqyLGtnI8TaffJmGKspB88FI8XDscYe6yNB1Szq26Kx0 v0GjtbHXexDeUS+ByOOSS9AVQLZKxSeOtNJgfyokYGBZFLcwjFU8cELZfBSzRX1ARD4M KGjQ4hrAmn6konghE6QduR9eixs45XLMyleyZwM+4mkbVNauM5rJzmmCAi5Dkyxnpd9X r6rXW+vbgDLpf6/K9L8d+jU3CwMwaCpqc4bkWjZkAvBmPXOByPzuZLmo3jWqRhyUsL2s V8eUdTrgvRm3ZK5LJycrYMlFpcFrGCkkWnXsEz1+qHSBZaDuPwzokw3hV9NNorwBtBwj SG3g==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1780544234; cv=none; d=google.com; s=arc-20240605; b=COtFl5HHGZVTKyMTKiHCyzL8BmCbp4FtNPjmEockD8LlySqzA/AgqlpIRHokRc1OsF vqP4Z6vDf2Po3gS4ffeNEOMppnOU1NHF5XvLtu96k5EZqP+rOW7rlhsPgr3bk9YUCwEc +MieRKVDdXq3eAbmTEeyhXXSDwVOC5Eo76ZfE9jMhFkbfVCcXTSSifjiJP2rb3YYDV+p MBlnDGKtr39X+742nLwQ0Yb25H1myrR2+07tHefhdYiDYQ2MS0fKopxAn3mOI8LBZCX9 vye2up9mN3Z0G3m83TFRO2jhPFCwiEniM0j4h46i2dvTGpsbjGWEzUS3m7NpH9LXMSgU vPgQ==
- Archived-at: <https://zsh.org/workers/54666>
- In-reply-to: <20260530055123.4084-1-mikachu@gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7YKTM88-BQFUMoQs_R8QNRd-YxqqVEjmhYsctN9mXeFCg@mail.gmail.com> <20260530055123.4084-1-mikachu@gmail.com>
On Sat, May 30, 2026 at 7:51 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> Originally reported in 46120, with minimal recipe in 46156.
>
> The QT_BACKSLASH case just removed backslashes without tracking how many, but we
> need to know that for later, so do it more like how QT_DOUBLE does it.
>
> Without the swe += bq, alias a=\\\[<tab> becomes a=\\\[\[ which isn't
> right.
I'm retracting this patch for now, the more I stared at this function,
the more I realize it can never work with complete_in_word the way
it's written. It tries to track the total number of removed quote
marks (whether it's " or ' or \) and then adjusts things based on
that, but it doesn't at all account for where these removed marks are
in relation to either the cursor or the start/end of the current word
(It's fairly trivial to come up with other examples that crash with
this patch too). I fiddled a bit with reworking it but it's obviously
a little tricky, don't hold your breath.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author