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=DATE_IN_FUTURE_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24049 invoked from network); 19 Sep 2023 15:15:33 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Sep 2023 15:15:33 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1695136533; b=jwirDUlAKJ83x7EwSiX03RuQ0sssZBmT+TrTu9FjIHA4kzhSwAhNac29mIlD9Yt+CS4G9f97AI sckJu5DGy0AIP2fB+zbVDZlfVBErwPA0PUhFxV8cStT7J3jXZ8aHRWNdJ7xrY80KI67ZOLIYgZ z7MXHDYjRMWQv/l88FdQEPFSg+xGWmSAxyd/MSOEc1uJShraxHc3yX+SVe4+SKkz1KTVvx+F1k rpR9ewmSueTvRRYSG94jdzsits06qk3wdOrjVc1k8iRuD8HkOIhlHnq7hS9WQSbekzKoRdK82q VBBAsS+2DyhGeA288MPho93reksUXidts9+7vNVMXWv+ZQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f44.google.com) smtp.remote-ip=209.85.167.44; dkim=pass header.d=gmail.com header.s=20230601 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=1695136533; bh=jOAqiqJU4CsWBi3xyqVTZEHSxFQ9HRo/OHUYOF3/cvY=; 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=I+ry+MFRf57K4lJLGVQQl4VwNSMSPJ6j6UQrU5gdD3VP3qXkHI+780hjZuCblhPc4XdHOa+bCl BnlamcFlLN6LRcvN49UQ72TxrXFM7B0r1tzNTidgVGqs1sbF+Wm+DG9C5aTSxB+lTuXGP750AR pi0QZPk94oHbyyJdLNmb/pXRQ8TRLWoZ+luonMZQL3UCGMhYF60jcC1hC2hM5r4qCOErhVp/+X s+I6lBmzp3eEEnBREnrugTRofyZBZ3EQSq3zYcVwWuPyMh1Zp/NMWrDrK+jMX69Prf8bPgKV9a UNp2p22XGGIs4J8WkelfI38Mp1l0XAFgnZ3hczpKb3bAGQ==; 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=jOAqiqJU4CsWBi3xyqVTZEHSxFQ9HRo/OHUYOF3/cvY=; b=OwYCH4mdOCi7HsIrARwPl+xUmu CRdB6TMskoNU4fkatNCz56ovSjNSi3lCqHUH1ExkLuMBwK1CfVNa4mPCcNLpRtkHtr+2e4KehNhJ5 kMtj7XUOouTo6UV5Xh9K2vPA2UQ7x6RRpPR7qxjII7z0pMvXq1/KTSUQCVHlKCZVMVXyKIlEICSCo A287G6HE1bSb4NxoH5NNGLFdn3oIgSKI7ZqATnYdGCv7JUm9gufT756YMunwmGnR6N1uCrrblONsM aVL5aL0rqS1gNn4E2V9RVOxyji7rjjsfRTnIFLHYPiKyfO1WgL3b8hBlejiMNfHrzuXyQzwgn6ZLs WUb1LL+g==; Received: by zero.zsh.org with local id 1qicRp-000HpY-5g; Tue, 19 Sep 2023 15:15:33 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f44.google.com) smtp.remote-ip=209.85.167.44; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f44.google.com ([209.85.167.44]:50506) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qicPg-000Gzu-06; Tue, 19 Sep 2023 15:13:21 +0000 Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-502fd1e1dd8so5744953e87.1 for ; Tue, 19 Sep 2023 08:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695136399; x=1695741199; darn=zsh.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jOAqiqJU4CsWBi3xyqVTZEHSxFQ9HRo/OHUYOF3/cvY=; b=cSw3pWoYW+rHzLp6OtYb5sQGLTFMDuZxatZ0bqbxrQWb7dEwlN2G8pNF3pOHhq17uv wmbZe+FzWvEnJruRZGOf3qM6cP52D+3QDUShP7H1AgtnuzSi/AVUnuXM3qvLm7DYegjw 7avWa0i4VitKt6WNnyJXi6VIE1r/gwhl2SwzI5xV28zHZEnOmVgU3foNyyZiixjNdUJz 6gvnAI2/Wzhfdn1Ymgu+dplrrIG3cZKsESEbGFVAv8BdJOQRycog0GtGZu6WOfzIsrir hL/GvPA63m/OxDHI2xcqD8feK3BM9J3HtfPcR62TO+1Di9VeByaVBlh2ojAyf0kp594c g+BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695136399; x=1695741199; h=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=jOAqiqJU4CsWBi3xyqVTZEHSxFQ9HRo/OHUYOF3/cvY=; b=BmSZL0qe/XsHb/V4gtW+iZ3hBVtNUB61WyrRgRd9jtHWCaRNQEFN4n0i6BD42DZNjQ 6eglz1ACKPmHzQqcxt864dGPF3RWaaV3+xEHp3pPT0u+c8tOQWLsPG9XzdrjOvpufuWm a9swaY6GqzbWIEQrLmLfxsXSSg1D8D7HlkXB6kqUkrg8H0sFzb9M8lIRcF7Io4TSF2jl 5T7yv2pcwN0HXF/9iYc3KyHOa4LeXA8dEankD0s1WXnHvsTG0TxiGmzgTh2z7vSWzHOA 63qjaxjVNor5UGLXm/9JSoW+mg6nODnOyjMAezCuUzWc72imlej9qSxhVHhSmlnPbZ4c sH5w== X-Gm-Message-State: AOJu0YwCv78kToqHU0nXkmp/HJBYHvipgoFu3ZqIUIUArQcmYmpbHQ51 3XRJ1dhqM4YKr/TA0jYXZP7zYwTVKoV3UuKzBVVOb/9W X-Google-Smtp-Source: AGHT+IFsKlq4Lri9o6YVXUOaqudSDLvX6PprIdRwbVq3l0zQdKWwcXiHf4mDHnCdU0vWRjLh2b/6jY15kpWNLHaBv74= X-Received: by 2002:a19:7011:0:b0:503:317b:8b7c with SMTP id h17-20020a197011000000b00503317b8b7cmr11482lfc.9.1695136399194; Tue, 19 Sep 2023 08:13:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sebastian Gniazdowski Date: Tue, 19 Sep 2023 17:14:35 -0500 Message-ID: Subject: Re: Quote of % in a completed func name? To: Bart Schaefer Cc: Zsh Users Content-Type: multipart/alternative; boundary="000000000000eb7e4d0605b7b215" X-Seq: 29267 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: --000000000000eb7e4d0605b7b215 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable other thing i've noted: you used ~ flag not in the idiomatic way, ie. not as (~j:|:) but before the var: (j:|:)~functions. Why? On Tue, 19 Sept 2023 at 17:08, Sebastian Gniazdowski wrote: > it works, thanks. Question: what does the * flag do in ${(*)BUFFER =E2=80= =A6 =E2=80=A6? > > On Mon, 18 Sept 2023 at 09:56, Bart Schaefer > wrote: > >> On Mon, Sep 18, 2023 at 6:42=E2=80=AFAM Sebastian Gniazdowski >> wrote: >> > >> > Could the % be somehow be quoted after completing? (\%exa works and >> calls the %func functon) >> >> Firstly, to prevent conflicts you can remove "jobs" from the same >> completion zstyle I sent earlier for leading colons in command >> completion. >> >> For command execution, you're probably best going with a >> zle-line-finish hook that does a search-and-replace, e.g. >> >> BUFFER=3D${(*)BUFFER//#%(#b)(${(kj:|:)~functions[(I)%*]})/\\\\$match[1]} >> >> (remove (*) and setopt extendedglob for older zsh) >> > > > -- > Best regards, > Sebastian Gniazdowski > > --=20 Best regards, Sebastian Gniazdowski --000000000000eb7e4d0605b7b215 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
other thing i've noted: you used ~ flag not in the idiom= atic way, ie. not as (~j:|:) but before the var: (j:|:)~functions. Why?

On Tue, 19 Sept 2023 at 17:08, Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
= it works, thanks. Question: what does the * flag do in ${(*)BUFFER =E2=80= =A6 =E2=80=A6?

On Mon, 18 Sept 2023 at 09:56, Bart Schaefer <schaefer@brasslant= ern.com> wrote:
On Mon, Sep 18, 2023 at 6:42=E2=80=AFAM Sebastian Gniazdowski
<sgniazdowsk= i@gmail.com> wrote:
>
> Could the % be somehow be quoted after completing? (\%exa works and ca= lls the %func functon)

Firstly, to prevent conflicts you can remove "jobs" from the same=
completion zstyle I sent earlier for leading colons in command
completion.

For command execution, you're probably best going with a
zle-line-finish hook that does a search-and-replace, e.g.

BUFFER=3D${(*)BUFFER//#%(#b)(${(kj:|:)~functions[(I)%*]})/\\\\$match[1]}
(remove (*) and setopt extendedglob for older zsh)


--
Best regards,
Sebastian Gniazdowski



--
Best regards,
Sebastian Gniazdowski

--000000000000eb7e4d0605b7b215--