Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Don't complete history modifiers when assigning parameter
- X-seq: zsh-workers 52223
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: Don't complete history modifiers when assigning parameter
- Date: Mon, 16 Oct 2023 10:39:04 +0200
- Archived-at: <https://zsh.org/workers/52223>
- List-id: <zsh-workers.zsh.org>
---
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author