mirror of
git://git.code.sf.net/p/zsh/code
synced 2026-01-06 09:41:07 +01:00
39804: internal: Document matchspec flags.
This commit is contained in:
parent
952e607395
commit
b4d5a55b39
3 changed files with 13 additions and 4 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2016-11-03 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 39804: Src/Zle/comp.h, Src/Zle/complete.c: internal: Document
|
||||
matchspec flags.
|
||||
|
||||
* 39803: Src/Zle/complete.c: internal: Document bin_compadd().
|
||||
|
||||
* 39802: Src/Zle/compcore.c, Src/Zle/complete.c: internal:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue