about summary refs log tree commit diff
path: root/Src/Zle/zle.h
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-01 09:37:12 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-01 09:37:12 +0000
commit00464365490f4c6f77ba5e16d7992cb6bbefc693 (patch)
tree6baa4a083ce2197c5f66451e4c98941f4dfaee8c /Src/Zle/zle.h
parent8f35520cb3ef271407d73404a59d51a6b815e8f7 (diff)
downloadzsh-00464365490f4c6f77ba5e16d7992cb6bbefc693.tar.gz
zsh-00464365490f4c6f77ba5e16d7992cb6bbefc693.tar.xz
zsh-00464365490f4c6f77ba5e16d7992cb6bbefc693.zip
manual/8478
Diffstat (limited to 'Src/Zle/zle.h')
-rw-r--r--Src/Zle/zle.h54
1 files changed, 44 insertions, 10 deletions
diff --git a/Src/Zle/zle.h b/Src/Zle/zle.h
index 470aa890f..2dfeb6950 100644
--- a/Src/Zle/zle.h
+++ b/Src/Zle/zle.h
@@ -144,19 +144,53 @@ typedef struct cutbuffer *Cutbuffer;
 
 #define KRINGCT 8   /* number of buffers in the kill ring */
 
+/* Types of completion. */
+
+#define COMP_COMPLETE        0
+#define COMP_LIST_COMPLETE   1
+#define COMP_SPELL           2
+#define COMP_EXPAND          3
+#define COMP_EXPAND_COMPLETE 4
+#define COMP_LIST_EXPAND     5
+#define COMP_ISEXPAND(X) ((X) >= COMP_EXPAND)
+
+/* Information about one brace run. */
+
+typedef struct brinfo *Brinfo;
+
+struct brinfo {
+    Brinfo next;		/* next in list */
+    Brinfo prev;		/* previous (only for closing braces) */
+    char *str;			/* the string to insert */
+    int pos;			/* original position */
+    int qpos;			/* original position, with quoting */
+    int curpos;			/* position for current match */
+};
+
 /* Convenience macros for the hooks */
 
-#define LISTMATCHESHOOK   (zlehooks + 0)
-#define INSERTMATCHHOOK   (zlehooks + 1)
-#define MENUSTARTHOOK     (zlehooks + 2)
-#define COMPCTLMAKEHOOK   (zlehooks + 3)
-#define COMPCTLBEFOREHOOK (zlehooks + 4)
-#define COMPCTLAFTERHOOK  (zlehooks + 5)
+#define LISTMATCHESHOOK    (zlehooks + 0)
+#define COMPLETEHOOK       (zlehooks + 1)
+#define BEFORECOMPLETEHOOK (zlehooks + 2)
+#define AFTERCOMPLETEHOOK  (zlehooks + 3)
+#define ACCEPTCOMPHOOK     (zlehooks + 4)
+#define REVERSEMENUHOOK    (zlehooks + 5)
+#define INVALIDATELISTHOOK (zlehooks + 6)
 
-/* compctl hook data structs */
+/* complete hook data struct */
 
-struct ccmakedat {
-    char *str;
-    int incmd;
+typedef struct compldat *Compldat;
+
+struct compldat {
+    char *s;
     int lst;
+    int incmd;
 };
+
+/* List completion matches. */
+
+#define listmatches() runhookdef(LISTMATCHESHOOK, NULL)
+
+/* Invalidate the completion list. */
+
+#define invalidatelist() runhookdef(INVALIDATELISTHOOK, NULL)