From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24715 invoked from network); 7 Jun 2023 06:04:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Jun 2023 06:04:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1686117842; b=L3mLu/bGn3mLl39X8w+oZSGoJumdhKBgtT7wA6HXfAbL+mczUJ+mueWV9yMAFt5IykFhXXn0SX fmFDVKzPysyGqVGsyrV/GErK5XpSoOdeTp+EOnagMty6I8YITBf9H0TEPLZE5pIKXzR7PFYvA/ VstD+OlQjG28Nz+1Z/DvEOEWtz12y0NzIpUTCyygqwEbPiN3quN2RcrpGtffHtgq87SF7t3L4N ZIYnJtV/OzhNs3zfeVo9Uqwaz52J2w/ONQp2dTfCCPUhavWHtwXtSjHzYfaSC0+TdBS/5yzjbr Au7VgPE2pD3Vul+o1gu/hh4tUKyyqCompxCOd83FumtJnA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oa1-f45.google.com) smtp.remote-ip=209.85.160.45; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1686117842; bh=DPrXv5iCw8fByRdJbS55oPPTaS5ElQo+BKmXQTTSZAA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=BaCM1G6U0YPxrieIlkPw5OZa0ro71275c71W0wcuh4EB0TtjXtOF8wFpBKDpM9rZYxH1cARUZ2 5dEeJd/3WEsSw84sdpWxdE+6fIcv6X5pV2oftrbjyIAOhtM1oQnG6lnOS1tZOnBXV/6xMX/WUg hazkEqwHUMbQvUg75SYcfvuMWVpM5nzzvya3bOQx+AWdm7ZTyZAYr7QK/D/pIzg0MAlD5Z+k4p nckWoNiaP8zITFqXNpCyG2kk/vfYltZaA4HBERpKJpNPBw/IPBKgyy2pPiugYZRkcoMRnP1+m7 /xW7LTf/EXtYtYja3XruFZMwsGTksVuBLHdu9joSN26X9g==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=HZIAHD1Mv3tPhzBNj0RVrrYhuLvupdkQ1oWXxzePakI=; b=m38QgP8JL9nnYGXwkW50egMrUy en4u1KN6445LXnIsezEBA5sqdhPcJJFPx+E4XxGCS+0Z2ANKXNwLxTiJJAkvqMxdon7R7rXk6vl6H l1lGVuVdS9sG4WsNopmH4QCwN9+3WOVfVUFY0MkgTVATRPzjqs8zNrupcFZr1j0Kyk11Iuxxcuewy fbTuckqw6KuQfgjF09RE4UFAmsiPxUsCBKOqKieZB4vDXxnB23tknMDTocg2Ey3whKckFyPYhneac qwrvhDJMd0y4lzR1hbUNd6zYvYyxUpbAtWJ4gAYYo+sR1AT1rPpvoMXsFl1UcRVrQrly7m5MBGMC2 gpTUQemQ==; Received: by zero.zsh.org with local id 1q6mH4-000Lkg-0W; Wed, 07 Jun 2023 06:04:02 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oa1-f45.google.com) smtp.remote-ip=209.85.160.45; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-oa1-f45.google.com ([209.85.160.45]:38066) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1q6mGp-000LRS-53; Wed, 07 Jun 2023 06:03:48 +0000 Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-19a34a63522so1492220fac.0 for ; Tue, 06 Jun 2023 23:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686117826; x=1688709826; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HZIAHD1Mv3tPhzBNj0RVrrYhuLvupdkQ1oWXxzePakI=; b=nIjPZ4ruO480CxN99gglvs/T8jLJC/jenYfAYpLkhq0K+g3UI9yK2oEVwB5rsYQWGq RDKu6DohfkXEDdSaYJouXFkxHly6H6C6FAeIAh2KKN4eT5oI8rCoMszwKr4WATzCCkdZ BSee9wx+TbbgPbEIRzpBkRfqwNsAdIskYzbDHcOrngWr74mjAVlojEQYVD7a2gDHRCTG 9Rib+LEMAw772YoXmr6pHD6l6MJ/WU4x0UFES5m0Tx6pe0CjwVOBT9cKu6X+k7hHl08k hsn3RBmrRbkrSjam7uTolFa11iBoO5ir7VUijIKLVXA7BZrSZ8lIQ3Yfj32OVIPKLjuJ p4Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686117826; x=1688709826; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HZIAHD1Mv3tPhzBNj0RVrrYhuLvupdkQ1oWXxzePakI=; b=Bpd3nwLQ/cklDqMsQ636Xdh4TmXh7GOHDMoWx8nMTU3WcEhk1+bRnMlKpiwn+9QNz0 Pe2IBM7BmxidbUgqmmQaqyQd30xAHIxzNWroaWC2vA/GSTWt5SIxLr1HY3g0mby+xRvf u4WQHpwdp2RK4ysaeRZOjHmdOT+P7VY1caQRU6Azwyrq19bxBxGmxc2IrBBhMOEpam4e M1iOYjPZ1PrS/NSD69uTr3vr0dXqvv2L6DVqU0mnLTU4FWIh3BISZNPNBx0c1szXci4D BvrTLEmOYS1g4KUtAoDmSoPzs4ii8TG81YM1nS80mMzcWzkhxwTEXK/Qanr8cDb/ZxIo Fysw== X-Gm-Message-State: AC+VfDx7AxZnVAKqieIJ0xtqoWEErmtEpJ6UHZSRDmX+xMQg2v9twXGi ruAdQ2ni5EREdo6hX5EGRi0lAbR/Q3zf9nzfulc+8Woe X-Google-Smtp-Source: ACHHUZ7asZ0FnQu+KZnUcYYsqD2e1Pjfz75DM3yufxHUTrDaleBbfPCTFIBNwffIPO60ws5I1tjLEfCIq5+k2fYE//M= X-Received: by 2002:aca:61d6:0:b0:39a:2b38:5a67 with SMTP id v205-20020aca61d6000000b0039a2b385a67mr1848028oib.4.1686117825665; Tue, 06 Jun 2023 23:03:45 -0700 (PDT) MIME-Version: 1.0 References: <20230505114154.76547-1-marlonrichert@users.noreply.github.com> In-Reply-To: <20230505114154.76547-1-marlonrichert@users.noreply.github.com> From: Marlon Richert Date: Wed, 7 Jun 2023 09:03:09 +0300 Message-ID: Subject: Re: [PATCH 1/3] Fix _prefix insertion logic To: Bart Schaefer Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51844 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Fri, May 5, 2023 at 2:44=E2=80=AFPM Marlon Richert wrote: > > This solves the following problems in the _prefix completer: > - The old code had logic for dealing with compstate[unambiguous] that > was unnecessary. It works fine without it. > - Because of this logic, if a widget set compstate[insert]=3D1 after > calling _main_complete, an `x` was left after the completion on the > command line. > - If the same widget also set `compstate[to_end]=3D`, then instead, the > last character of the inserted completion would be treated as an > autoremovable suffix, with the actual suffix being inserted to the > line as a normal character. > - After inserting a completion, the cursor would move to the end of the > entire current word on the command, not the end of word that was > inserted. This is not what you want with _prefix, since you are trying > to complete a word _before_ the one on the command line, after which > you usually want to insert a separator, such as a space or slash, > before the next word. > > Discussed in workers/51641. > --- Any further comments on this patch? Will it be committed?