summary refs log tree commit diff
path: root/Src/Zle/compcore.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-01-28 19:13:39 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2014-01-28 19:13:39 -0800
commit8d3d34cfa46c1bfdd0e473e3942edfa45f66e47c (patch)
tree9c8b60e4f8acefdab3045f9d656b8cfd804399c6 /Src/Zle/compcore.c
parenta2098b0b26b47917cc725b387c63d75dfe0098f2 (diff)
parent584ea888115e48da43b01b5f5a7e1511a469f081 (diff)
downloadzsh-8d3d34cfa46c1bfdd0e473e3942edfa45f66e47c.tar.gz
zsh-8d3d34cfa46c1bfdd0e473e3942edfa45f66e47c.tar.xz
zsh-8d3d34cfa46c1bfdd0e473e3942edfa45f66e47c.zip
Merge branch 'master' of git://git.code.sf.net/p/zsh/code
Conflicts:
	ChangeLog
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;