summaryrefslogtreecommitdiff
path: root/Src/Zle/compcore.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2014-08-11 17:39:42 +0200
committerAxel Beckert <abe@deuxchevaux.org>2014-08-11 17:39:42 +0200
commit382c26acfc62a56744ab9eb603efc56130764fd3 (patch)
tree1b7cb9d3e372481007fc4546e7d06ce5bb1bc104 /Src/Zle/compcore.c
parent73508e345b4925f33b7f652aba9bd313169e5ac2 (diff)
parentf8ae47f29b766dc0330b19d7fdb35859d6aab930 (diff)
downloadzsh-382c26acfc62a56744ab9eb603efc56130764fd3.tar.gz
zsh-382c26acfc62a56744ab9eb603efc56130764fd3.zip
New upstream release candidate: Merge branch 'upstream' into debian
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r--Src/Zle/compcore.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 5c5628a8d..ac7785ab7 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -1260,6 +1260,20 @@ check_param(char *s, int set, int test)
ispar = (br >= 2 ? 2 : 1);
b[we-wb] = '\0';
return b;
+ } else if (offs > e - s && *e == ':') {
+ /*
+ * Guess whether we are in modifiers.
+ * If the name is followed by a : and the stuff after
+ * that is either colons or alphanumerics we probably are.
+ * This is a very rough guess.
+ */
+ char *offsptr = s + offs;
+ for (; e < offsptr; e++) {
+ if (*e != ':' && !ialnum(*e))
+ break;
+ }
+ ispar = (br >= 2 ? 2 : 1);
+ return NULL;
}
}
return NULL;