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,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22052 invoked from network); 7 May 2022 20:30:43 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 May 2022 20:30:43 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1651955443; b=lOAVIg0PJHYMCZJcXxzjSMDQRzv8OzV5HNewkOYDEQTvAkfrKzuFzWC3xKVRLQXfCCOr1NVA/z 6KKR1WzN+ElTNbV8jO2+2oVKsiEpG/C5nof2ulDCd0ujoWjmVvJR4dLm82alIYH/snGL8hUb6I dGnAbZYwA0ZUa37ieaW9cWkdnkN+7ISVjfIqTAL73/QQb1uND/ynMMM5l6X4T7CKZp5YjgxVYb MA91skmJu/Dhe2zKqx+JX/lRdFop/EkanU6SKMhO7/8ng7X0RoxLPubxlQhtVdHM0bDIfpKa6Z qVYCk0K4J0DCxlvgGdtdyGeUrq1WymdNB422qqyCvnyRVg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f42.google.com) smtp.remote-ip=209.85.166.42; dkim=pass header.d=gmail.com header.s=20210112 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=1651955443; bh=azV9l6fWRSt6wzXgTqa1adil3/NyVKEIXx0pIo08NhA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=XWOLeRf6XXFv91M2VCPcDzSKkQ8YNxn/YlnhietTaL9sTORUDTns2U623ffZTUL0qOMNako3Xe WD6XA7KWu0Hmux0I34KSQ904yjR9q1u0zmXvggH//WCIlHsG2AwbfT+E8XVci0HTIZGEd2Vdqg 2vyjFgskiXiRp1IhRPogL6aq2MweTVSUz7VPaU28K/z58mrOD3UAT7ruXL454yo9Wqy5Tola2S j1aKMo/xPmDCFbaVRCM9MgCk1vHqOXCCHFNOqXsC5s2rG0SnWfNnEz9Fvmw9HjqSZjSxY9NQQ8 jSGi2Kk8Ti+r2x1N0elMjmwm1W5RkfAepBgfeajadZvPWA==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ZUbeYo7wtErHNkbaghWSxmcgWN5SJKNrF3OW538HbM4=; b=eY4KEiRS8kgavz6ZVlP4NsOEfG 4aBjqPeXkWrSi59+w1sItM7WjV9e2L+RQdJI0zeUsHe+KmfORgqUCPFh/0ZvmsD1/3SV0leMrcoG7 xC2zA6mSHesOujnVUfYx7R7rrghd11I/Hh/U5Fc7C+Uv5UzdcGDsExz6EuEvVYm4v/R5p2Zn9WJ+d 6Zqm7ql0njGfDRRaIW+IG8EGSJ3icXzMwXqf2ZC/ioRDvpZvLnfPp3OawyFS1c4K2Ckv0enxvr2CL 7Ar5j1qfYbZWHtfSVkd820nMATBFeqAldZtVvvMShBv1wIfhxv2EArshGqzrlE7jvPYfxXLrIYoYF cx+rC4TQ==; Received: from authenticated user by zero.zsh.org with local id 1nnR4c-0009QS-QC; Sat, 07 May 2022 20:30:42 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f42.google.com) smtp.remote-ip=209.85.166.42; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f42.google.com ([209.85.166.42]:41542) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nnR43-0008k8-BO; Sat, 07 May 2022 20:30:07 +0000 Received: by mail-io1-f42.google.com with SMTP id z26so11479364iot.8 for ; Sat, 07 May 2022 13:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZUbeYo7wtErHNkbaghWSxmcgWN5SJKNrF3OW538HbM4=; b=kXNClN9sDKF9JqNjH9eZapaJb1J8gigEfmmjERGpV18prhedfjuFOAxhRpmlLJtxrc lv4NlUfRmOgFQW+lBXnPFkrt+WSfJ6Mr4G1XkSteNV9p44uTXo7wB9fPCjyjmuwDidrV FMJH2acSe0hZxGeq0KiloFw9ISNJZOTki/Ns48h/fdR+merDn3Ass4ilGRfooMhK6MNO 25m/fO9UfU2mncmvN4Cj0WNfZ/Oh9gCZTBxggFrqX5ZtNT7cc6R3vJtR2r8Wrt4T180X oiVHdW4nXtMZpu0LHtkMQJdUWFHERzSrH+SN8gkqL1DZXiG9gbODcoiqpyE1khwKPD3z qhcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZUbeYo7wtErHNkbaghWSxmcgWN5SJKNrF3OW538HbM4=; b=maejru+Ij1TlSHtanu2y+KmNdM79yWvgZdskhGpPbqV8qeNnJf1TWZ6FvljY9XwCdF nKhd/3mZurhPEMEXcNZGlz2/R7nFkj3I946Y9MckryXGaTRxwsirBrG6e6Xb5zHYfCRP +bjduiEpWbN+XL7cLGijRGoKlBLcAycWwyIIP8UjMNjVvakVoSftpU/3QDUbAsOO8oMg s+5JVO85gmzGf4SrI3zazGdSK2cexbYQIrxDdifPc/RezyfR8i1EeL1KyTdV0U2f8nxS irpHaIsaqPfYuj3m7tPDMtyeG4R2w5kusiHQY1y8eUvcybUAICxad3V6xtpGxhMqUfgx e5nQ== X-Gm-Message-State: AOAM533eM17nv8sQ8/G9ScR7pvTBrQhQBnvQHemnG+XVfdqb9xV/zHgf 1htvd8re5QFHuzlbXGHQRnia/4p8ckI2CmddFiY= X-Google-Smtp-Source: ABdhPJxLhnSSp2yTzdonvM02FFo9BhnHhJkGFSlJbqUuXWGrEUi7d1UT/3aPP0NxJtIw8mtQEfjvpyTY5ErRUhRZDQE= X-Received: by 2002:a05:6602:1591:b0:60f:6acc:6979 with SMTP id e17-20020a056602159100b0060f6acc6979mr3940070iow.173.1651955405849; Sat, 07 May 2022 13:30:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pier Paolo Grassi Date: Sat, 7 May 2022 22:29:29 +0200 Message-ID: Subject: Re: completion with separator To: Bart Schaefer Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="00000000000026862705de71d7cc" X-Seq: 27734 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --00000000000026862705de71d7cc Content-Type: text/plain; charset="UTF-8" > It should already be happening that way. If you type a space or another return after the comma, it should disappear. yes it is removed when I press a space after selection, and even if I press enter after the selection. But this way, in the enter case, the line is accepted and executed. What I would like is for the comma not to be inserted after the completion, I would like to insert it by myself if I want to insert multiple arguments. So when I press enter in the menu selection the voice is selected and the line is: func acat instead of func acat, thanks Pier Paolo Grassi Il giorno sab 7 mag 2022 alle ore 22:12 Bart Schaefer < schaefer@brasslantern.com> ha scritto: > On Sat, May 7, 2022 at 3:41 AM Pier Paolo Grassi > wrote: > >> >> _values -s , categories $categories_array >> >> > func a >> >> > func acat, >> >> I would like that the comma was not added automatically, or at least to >> be removed automatically when I select a voice in menu selection with enter. >> is this possible? >> > > It should already be happening that way. If you type a space or another > return after the comma, it should disappear. > > If that's not happening the way you like, you can try some variation of > > remove_comma=(-r '[:alnum:] \t\n\-') > _values -O remove_comma -s , categories $categories_array > > to remove the comma when you type (in that example) anything alphanumeric > or whitespace, but whether that works depends on how you've defined the > specs in $categories_array (-O applies only to specs that have an "action" > component). > > > --00000000000026862705de71d7cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> It should already be happening that way.=C2=A0 If you= type a space or another return after the comma, it should disappear.
<= div>
yes it is removed when I press a space after selection, = and even if I press enter after the selection. But this way, in the enter c= ase, the line is accepted and executed.
What I would like is for = the comma not to be inserted after the completion, I would like to insert i= t by myself if I want to insert multiple arguments. So when I press enter i= n the menu selection the voice is selected and the line is:

<= /div>
func acat<cursor>=

instead of=C2=A0

func acat,<cursor>

thanks


Pier Paolo G= rassi


Il giorno sab 7 mag = 2022 alle ore 22:12 Bart Schaefer <schaefer@brasslantern.com> ha scritto:
On = Sat, May 7, 2022 at 3:41 AM Pier Paolo Grassi <pierpaolog@gmail.com> wrote:

_values -s , categories $categories_array

> func a<tab>
<menu completion w= here I select a value with enter>
> func acat,<cursor>= ;

I would like that the comma was not added automa= tically, or at least to be removed automatically when I select a voice in m= enu selection with enter.
is this possible?

It should already be happening that way.=C2=A0= If you type a space or another return after the comma, it should disappear= .

If that's not happening the way you like, yo= u can try some variation of

remove_comma=3D(-r= '[:alnum:] \t\n\-')
_values -O remove_comma -s , categor= ies $categories_array

to remove the comma when you= type (in that example) anything alphanumeric or whitespace, but whether th= at works depends on how you've defined the specs in $categories_array (= -O applies only to specs that have an "action" component).
<= br>

--00000000000026862705de71d7cc--