From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: [patch] Associative array suffix in command position
Date: Wed, 18 Jul 2018 06:54:34 -0500 [thread overview]
Message-ID: <20180718115433.GA75545@CptOrmolo.darkstar> (raw)
When completing an associative array in the command position = is used
as the suffix. I think it's more likely (at least in my own usage) that
the user only wants to change a single key not the entire array. Thus
use [ as the suffix not =. There could be a zstyle knob to pick = or [,
but I don't think it'd be used. So unless someone speaks up, I'm
inclined to omit the knob.
- Matthew Martin
diff --git a/Completion/Zsh/Type/_command_names b/Completion/Zsh/Type/_command_names
index 940f341cb..96ea57687 100644
--- a/Completion/Zsh/Type/_command_names
+++ b/Completion/Zsh/Type/_command_names
@@ -31,7 +31,8 @@ else
'suffix-aliases:suffix alias:_suffix_alias_files'
'reserved-words:reserved word:compadd -Qk reswords'
'jobs:: _jobs -t'
- 'parameters:: _parameters -g "^*readonly*" -qS= -r "\n\t\- =["'
+ 'parameters:: _parameters -g "^*(readonly|association)*" -qS= -r "\n\t\- =["'
+ 'parameters:: _parameters -g "*association*~*readonly*" -qS\[ -r "\n\t\- =["'
)
fi
reply other threads:[~2018-07-18 11:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180718115433.GA75545@CptOrmolo.darkstar \
--to=phy1729@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).