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 24593 invoked from network); 14 Sep 2023 21:05:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Sep 2023 21:05:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1694725514; b=TP/LmH57Gj4c6NYjX5ywi0jTsHhxCay/kmazloAJ62R1C1f0+AycR4L12Djb5AJi5euTtwqmUi T49BXK8pr5ePBs4kwGri9XRR03PVfb/jJQ8Xj2e1psznhPyBHQuaQzrLPMDYLq+zrlnwUdIHR7 eo6DjweJTQpApc5VTalqIB9xoUHwcpM2XMZO+XwfHOkEwxbc3ZTv3O3wdLE8Jp51CRb77OzeMy HivXSufl3+h18wQzlsbaygvkl2Hs5JDO60h2cyF75Iizo+5GZu4tWNRCUGJHWbYNHG0HFa64cH sKsemaNXne3UtPvSlOcQP++p+3o7W/6itrKBwFimObzVkA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f42.google.com) smtp.remote-ip=209.85.167.42; 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=1694725514; bh=c+/RvV35ufsGAtZtPo4Lhky+XXdQhAh4wEbsNqhbN9g=; 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=dRjjpt9sbnCc88wFwYMojuaFK2daArrjJzE3wZiq2nM/xSMY/3eDeZFGSkcabOGKxTw6bWv/MF GBEnSXLaj4tON6VWNP304/flP4w/9oSmA7XNo4nuG/4uJlCspBEvocePLukHu15NL7I3PYbyXf 4WZ3Xv7L/ob49+T02WwQYlQ5K0PWIsNveYDWyNOqDGVtEd6D/xsvT+Ta3bXg8o5FZ9ndoGzD+v i//Em8QNs3xjQljc25aMyLooGaAPIoTG9Xv6ekU78rYyUWfLdMzjymGcNb0ZiEFJ+VhhjB/0Bp 9nv/LRrqFy1JO14P3ZAj+76SuUKd7aN2m4Ljbt9qqDlBaw==; 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=VgY19ciD/beTM26Vm5SQezI/kstPkS7nJrfBsP/qFSk=; b=pjG8rxBDb9sTgSgKTdh17tyQfo 5vQ/ReEdqp6PVeYdSvvrCdCoMuMrJ2KiTCmjgGOJ8I3IXW/bHK8oBx1uQPj2VKwS7ZEI5HHRZVybE 5k48xCtmcV12+0jLl+j55/2p7nSCS+g9/pEm+k8OAbd0LPMUD5VyGeN0Tna0O8oNDbPv9711bQ1O7 jClfWXGKaI8cfe33yQtlelRRw/z0HpMDSayXDZ20kmUWdUQo3nYdNiVOHd2czGr4qt2++sSPTmjLL 3EHCoQc27VyQ8LbM1/qo7hq4Y/sgHVbNI2KDbY9W4bhQ/bR2LOZ4zvtOcydXhzxfHPw3S8lt4kNgk pxiA6rNQ==; Received: by zero.zsh.org with local id 1qgtWR-000Dcm-KS; Thu, 14 Sep 2023 21:05:11 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f42.google.com) smtp.remote-ip=209.85.167.42; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f42.google.com ([209.85.167.42]:42427) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qgtVs-000DIJ-8O; Thu, 14 Sep 2023 21:04:38 +0000 Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-500bbe3ef0eso1750818e87.1 for ; Thu, 14 Sep 2023 14:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694725475; x=1695330275; 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=VgY19ciD/beTM26Vm5SQezI/kstPkS7nJrfBsP/qFSk=; b=GetONndIYI0XfFPaojUQrFgRhBd61DyhX/g2NabCYZwVOdwsik8Cu0r7averxhd3tS VG59WjMt7sK7dBjYwauSyJunUlF0x2JE7FSKfuN3xdmajH4Ym53DeEzf5DtF70CiUIJ/ 6cBQMH6WCXxcdnAqvDJaQQQUMvI+mpTuklQhoa7SO0lMMK7oR4QeNYBJ7IEFim2GeM/6 FIWzjh0975HR1diO3qrwEutGkDY6+XA/UrHCygijeNv4q++p5afKmyeoR9QCQMunwp5M aYEFJJ5QaLKQAzPM+K7LL+dhGD5N3hCUVYUXc699MCkz7Ro9B9DVPLXXFPIobG2dCh38 EL1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694725475; x=1695330275; 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=VgY19ciD/beTM26Vm5SQezI/kstPkS7nJrfBsP/qFSk=; b=Qk7iOWNe2lN9D3wiMA9hERHTk/ph1kdozT63/Je11yJ8/pEAdoGE4XzKO/RdNqMjf6 ksjnw96jH8n75q9AZvUx/7IAQ1TKwp9CBEUhAF/7u08xCd3oqXufPbtMTCvr4dUl/Ks2 jaLjiIFHekGFcOEFnxtXFUtPY+DQbga0uNymwpUkq2XrPLYF+LCTgI3LZ1HNHpDk/Hhv pPQi++35ux+9raJWu71JX3J/490aa15sxqkby+9irwzRnmwggPT1n7ls9sakLl+BIrFw G9H4NHvr9SM3kzh4kPEUO2luyXcOJWcvow5S1cI2PbFn40PFBoRSGRl8ko0czk6yDewQ A4JA== X-Gm-Message-State: AOJu0Yw9ZDZWYcDaiIRNdmI7ba/HcMBhBpKagfva6JdC4WC9T1/LDtYA OVf1cxUlf0jjNpXux5vLOY7HHF8N02oEinqGYCk= X-Google-Smtp-Source: AGHT+IHQFFw/+eegWEW6/x3kTr7XzscKzHVDavRCAMxqyas8gMevBt7eHEcwu6TV8BEmj5Q70Gi6l6srKobUZPQh3i8= X-Received: by 2002:a05:6512:3d17:b0:4fb:7d09:ec75 with SMTP id d23-20020a0565123d1700b004fb7d09ec75mr1395547lfv.4.1694725474857; Thu, 14 Sep 2023 14:04:34 -0700 (PDT) MIME-Version: 1.0 References: <20230914121002.10274-1-mikachu@gmail.com> In-Reply-To: <20230914121002.10274-1-mikachu@gmail.com> From: Sebastian Gniazdowski Date: Thu, 14 Sep 2023 23:05:48 -0500 Message-ID: Subject: Re: PATCH: Move _history_modifiers call to _parameter To: Mikael Magnusson Cc: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="000000000000ebb7470605580562" X-Seq: 52143 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: --000000000000ebb7470605580562 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I created a mew function with your patch applied. Advice on changing from _pa=E2=80=A6terrs to the new function, when at: $ ::? On Thu, 14 Sept 2023 at 07:10, Mikael Magnusson wrote: > _parameters is used in many contexts, like assignments in command > position, assignment after typeset, etc, where history modifiers are not > valid. _brace_parameter already calls _history_modifiers explicitly so > this seems more in line with that. > --- > Completion/Zsh/Context/_parameter | 5 +++++ > Completion/Zsh/Type/_parameters | 5 ----- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/Completion/Zsh/Context/_parameter > b/Completion/Zsh/Context/_parameter > index 7e7788535c..b08d665f58 100644 > --- a/Completion/Zsh/Context/_parameter > +++ b/Completion/Zsh/Context/_parameter > @@ -1,3 +1,8 @@ > #compdef -parameter- > > +if compset -P '*:'; then > + _history_modifiers p > + return > +fi > + > _parameters -e > diff --git a/Completion/Zsh/Type/_parameters > b/Completion/Zsh/Type/_parameters > index 7f6f33e0ee..7b7692a3c7 100644 > --- a/Completion/Zsh/Type/_parameters > +++ b/Completion/Zsh/Type/_parameters > @@ -6,11 +6,6 @@ > # If you specify a -g option with a pattern, the pattern will be used to > # restrict the type of parameters matched. > > -if compset -P '*:'; then > - _history_modifiers p > - return > -fi > - > local i pfilt > local -i nm=3D$compstate[nmatches] > local -a expl pattern=3D( -g \* ) normal described verbose faked fakes t= mp > -- > 2.38.1 > > > --=20 Best regards, Sebastian Gniazdowski --000000000000ebb7470605580562 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I created a mew function with your patch applied. Advice on = changing from _pa=E2=80=A6terrs to the new function, when at: $ ::<TAB&g= t;?

On Thu, 14 Sept 2023 at 07:10, Mikael Magnusson <mikachu@gmail.com> wrote:
_parameters is used in many context= s, like assignments in command
position, assignment after typeset, etc, where history modifiers are not valid. _brace_parameter already calls _history_modifiers explicitly so
this seems more in line with that.
---
=C2=A0Completion/Zsh/Context/_parameter | 5 +++++
=C2=A0Completion/Zsh/Type/_parameters=C2=A0 =C2=A0| 5 -----
=C2=A02 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Completion/Zsh/Context/_parameter b/Completion/Zsh/Context/_pa= rameter
index 7e7788535c..b08d665f58 100644
--- a/Completion/Zsh/Context/_parameter
+++ b/Completion/Zsh/Context/_parameter
@@ -1,3 +1,8 @@
=C2=A0#compdef -parameter-

+if compset -P '*:'; then
+=C2=A0 _history_modifiers p
+=C2=A0 return
+fi
+
=C2=A0_parameters -e
diff --git a/Completion/Zsh/Type/_parameters b/Completion/Zsh/Type/_paramet= ers
index 7f6f33e0ee..7b7692a3c7 100644
--- a/Completion/Zsh/Type/_parameters
+++ b/Completion/Zsh/Type/_parameters
@@ -6,11 +6,6 @@
=C2=A0# If you specify a -g option with a pattern, the pattern will be used= to
=C2=A0# restrict the type of parameters matched.

-if compset -P '*:'; then
-=C2=A0 _history_modifiers p
-=C2=A0 return
-fi
-
=C2=A0local i pfilt
=C2=A0local -i nm=3D$compstate[nmatches]
=C2=A0local -a expl pattern=3D( -g \* ) normal described verbose faked fake= s tmp
--
2.38.1




--
Best regards,
Sebastian Gniazdowski

--000000000000ebb7470605580562--