From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH: Don't complete history modifiers when assigning parameter
Date: Mon, 16 Oct 2023 10:39:04 +0200 [thread overview]
Message-ID: <20231016083904.4761-1-mikachu@gmail.com> (raw)
---
Completion/Zsh/Type/_command_names | 4 ++--
Completion/Zsh/Type/_parameters | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Completion/Zsh/Type/_command_names b/Completion/Zsh/Type/_command_names
index e77f9b72f6..26c87ffc3d 100644
--- a/Completion/Zsh/Type/_command_names
+++ b/Completion/Zsh/Type/_command_names
@@ -36,8 +36,8 @@ else
'suffix-aliases:suffix alias:_suffix_alias_files'
'reserved-words:reserved word:compadd -Qk reswords'
'jobs:: _jobs -t'
- 'parameters:: _parameters -g "^*(readonly|association)*" -qS= -r "\n\t\- =[+"'
- 'parameters:: _parameters -g "*association*~*readonly*" -qS\[ -r "\n\t\- =[+"'
+ 'parameters:: _parameters -h -g "^*(readonly|association)*" -qS= -r "\n\t\- =[+"'
+ 'parameters:: _parameters -h -g "*association*~*readonly*" -qS\[ -r "\n\t\- =[+"'
)
if zstyle -t ":completion:${curcontext}:aliases" verbose; then
diff --git a/Completion/Zsh/Type/_parameters b/Completion/Zsh/Type/_parameters
index 7f6f33e0ee..45dbb881ae 100644
--- a/Completion/Zsh/Type/_parameters
+++ b/Completion/Zsh/Type/_parameters
@@ -6,7 +6,9 @@
# 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
+local assignment
+zparseopts -D -K -E h=assignment
+if [[ $assignment != -h ]] && compset -P '*:'; then
_history_modifiers p
return
fi
--
2.38.1
next reply other threads:[~2023-10-16 8:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 8:39 Mikael Magnusson [this message]
2023-10-16 8:44 ` Mikael Magnusson
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=20231016083904.4761-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).