Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 3/4] internal: Document matchspec flags.
- X-seq: zsh-workers 39804
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 3/4] internal: Document matchspec flags.
- Date: Tue, 1 Nov 2016 17:26:10 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=ruV7nNms4A8t7WpBYYcfSyQtw50=; b=d0p0FN e5Y7bd49/bOPZECUP2gAlRwOllz003I01UvNrsp7jmRaDiBRkaqfPCr6AX9HGmw2 qxsRCTE1ICIkMF+xlo6knz7fU8hK/ytUXzNBUELzZYAGKT0ulIjKXS+3QOlPAQ96 GJISFW5rDjJb8pNHWfn9vd5FtfUngzCFKgP2s=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=smtpout; bh=ruV7nNms4A8t7WpBYYcfSyQtw50=; b=VKha1 huYgtXKJuhu5ilorQq78SLeD+Iwklcp5W9oInnapv3f5xiKZmV/+YTCGt7JB6ewh 2TIM+Cg3dKPStYB2cf4MQEGMJZMPaJdZytti2cATDlYwyuoPgD0Na1RlBEXJ63Ts TLwsh0CxrMrrW/Y/sThB4TJyrvcVQfLXG1kxUA=
- In-reply-to: <1478021171-22495-1-git-send-email-danielsh@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1478021171-22495-1-git-send-email-danielsh@fujitsu.shahaf.local2>
---
Src/Zle/comp.h | 6 ++++++
Src/Zle/complete.c | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Src/Zle/comp.h b/Src/Zle/comp.h
index dfac35c..14af617 100644
--- a/Src/Zle/comp.h
+++ b/Src/Zle/comp.h
@@ -160,9 +160,15 @@ struct cmatcher {
int ralen; /* length of right anchor */
};
+/* Flags for cmatcher::flags */
+/* Upon match, insert the string from the line rather than the string
+ * from the trial completion ("word"). */
#define CMF_LINE 1
+/* Match with an anchor on the left. */
#define CMF_LEFT 2
+/* Match with an anchor on the right. */
#define CMF_RIGHT 4
+/* ... */
#define CMF_INTER 8
/*
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index 484754b..7980518 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -249,14 +249,14 @@ parse_cmatcher(char *name, char *s)
if (!*s) break;
switch (*s) {
- case 'b': fl2 = CMF_INTER;
+ case 'b': fl2 = CMF_INTER; /* FALLTHROUGH */
case 'l': fl = CMF_LEFT; break;
- case 'e': fl2 = CMF_INTER;
+ case 'e': fl2 = CMF_INTER; /* FALLTHROUGH */
case 'r': fl = CMF_RIGHT; break;
case 'm': fl = 0; break;
- case 'B': fl2 = CMF_INTER;
+ case 'B': fl2 = CMF_INTER; /* FALLTHROUGH */
case 'L': fl = CMF_LEFT | CMF_LINE; break;
- case 'E': fl2 = CMF_INTER;
+ case 'E': fl2 = CMF_INTER; /* FALLTHROUGH */
case 'R': fl = CMF_RIGHT | CMF_LINE; break;
case 'M': fl = CMF_LINE; break;
case 'x': break;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author