diff options
author | Oliver Kiddle <opk@zsh.org> | 2016-06-22 01:37:07 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2016-06-22 01:37:07 +0200 |
commit | e83489fc4ba168abeb5ea7e23e64383fed181ed3 (patch) | |
tree | b573a21ddbccc2adf8132166b2a7b5a22d6bec6d /Src | |
parent | 139a4dbe07728a22dcb120d1ca9ff3cdae98471a (diff) | |
download | zsh-e83489fc4ba168abeb5ea7e23e64383fed181ed3.tar.gz zsh-e83489fc4ba168abeb5ea7e23e64383fed181ed3.tar.xz zsh-e83489fc4ba168abeb5ea7e23e64383fed181ed3.zip |
38714: add x: syntax to match specs to make it possible to disable match specs hardcoded in completion functions
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/complete.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c index 30fab541a..0c14d86d5 100644 --- a/Src/Zle/complete.c +++ b/Src/Zle/complete.c @@ -241,6 +241,7 @@ parse_cmatcher(char *name, char *s) case 'E': fl2 = CMF_INTER; case 'R': fl = CMF_RIGHT | CMF_LINE; break; case 'M': fl = CMF_LINE; break; + case 'x': break; default: if (name) zwarnnam(name, "unknown match specification character `%c'", @@ -252,6 +253,15 @@ parse_cmatcher(char *name, char *s) zwarnnam(name, "missing `:'"); return pcm_err; } + if (*s == 'x') { + if (s[2] && !inblank(s[2])) { + if (name) + zwarnnam(name, + "unexpected pattern following x: specification"); + return pcm_err; + } + return ret; + } s += 2; if (!*s) { if (name) |