From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH: Move _history_modifiers call to _parameter
Date: Thu, 14 Sep 2023 14:10:02 +0200 [thread overview]
Message-ID: <20230914121002.10274-1-mikachu@gmail.com> (raw)
_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=$compstate[nmatches]
local -a expl pattern=( -g \* ) normal described verbose faked fakes tmp
--
2.38.1
next reply other threads:[~2023-09-14 12:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 12:10 Mikael Magnusson [this message]
2023-09-15 4:05 ` Sebastian Gniazdowski
2023-09-14 23:39 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230914121002.10274-1-mikachu@gmail.com \
--to=mikachu@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).