From: Eric Cook <llua@gmx.com>
To: zsh-workers@zsh.org
Subject: [PATCH] _subscript: fix the completion of associative array keys
Date: Tue, 26 Jan 2016 01:49:27 -0500 [thread overview]
Message-ID: <1453790967-23314-1-git-send-email-llua@gmx.com> (raw)
iirc the way ${(P)var} works was changed/"fix"(?) recently, but i can't find
the thread now so i may be wrong. But currently: $options[<tab>
completes values not the keys.
---
Completion/Zsh/Context/_subscript | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript
index 0ccc0c4..5e898d8 100644
--- a/Completion/Zsh/Context/_subscript
+++ b/Completion/Zsh/Context/_subscript
@@ -81,7 +81,7 @@ elif compset -P '\('; then
elif [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then
local suf MATCH MBEGIN MEND
local -a keys
- keys=(${${(kP)compstate[parameter]}//(#m)[\$\\\[\]\(\)\[\{\}]/\\$MATCH})
+ keys=(${${(k)${(P)compstate[parameter]}}//(#m)[\$\\\[\]\(\)\[\{\}]/\\$MATCH})
keys=(${keys//#%(#m)[*@]/(e)$MATCH})
[[ "$RBUFFER" != (|\\)\]* ]] && suf="$osuf"
--
2.6.4
next reply other threads:[~2016-01-26 7:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 6:49 Eric Cook [this message]
2016-01-26 7:18 ` Eric Cook
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=1453790967-23314-1-git-send-email-llua@gmx.com \
--to=llua@gmx.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).