about summary refs log tree commit diff
path: root/Src/Zle/zle_tricky.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-08-03 20:57:32 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-08-03 20:57:32 +0000
commit4a3ce8ab89c73f88559d9c48fdb4ed459a8aceef (patch)
tree383ec6d78f7706104972d692226f8729d13f60ab /Src/Zle/zle_tricky.c
parentd48faef8cdff3c7c63c0a9164443e3d337aa1ec1 (diff)
downloadzsh-4a3ce8ab89c73f88559d9c48fdb4ed459a8aceef.tar.gz
zsh-4a3ce8ab89c73f88559d9c48fdb4ed459a8aceef.tar.xz
zsh-4a3ce8ab89c73f88559d9c48fdb4ed459a8aceef.zip
29644: work around _describe bug, plus cosmetic tweaks
Diffstat (limited to 'Src/Zle/zle_tricky.c')
-rw-r--r--Src/Zle/zle_tricky.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 19787f9ff..999b2b7be 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -398,7 +398,18 @@ mod_export char *cmdstr;
 /**/
 mod_export char *varname;
 
-/* != 0 if we are in a subscript */
+/*
+ * != 0 if we are in a subscript.
+ * Of course, this being the completion code, you're expected to guess
+ * what the different numbers actually mean, but here's a cheat:
+ * 1: Key of an ordinary array
+ * 2: Key of a hash
+ * 3: Ummm.... this appears to be a special case of 2.  After a lot
+ *    of uncommented code looking for groups of brackets, we suddenly
+ *    decide to set it to 2.  The only upshot seems to be that compctl
+ *    then doesn't add a matching ']' at the end, so I think it means
+ *    there's one there already.
+ */
 
 /**/
 mod_export int insubscr;