From 904b939cbd81a542303da2c58288b95b153106f5 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:17:36 +0000 Subject: zsh-3.1.5-pws-10 --- Src/Zle/compctl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Src/Zle/compctl.c') diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c index e3b778508..f71d67510 100644 --- a/Src/Zle/compctl.c +++ b/Src/Zle/compctl.c @@ -1676,7 +1676,7 @@ bin_compadd(char *name, char **argv, char *ops, int func) char *p, **sp, *e; char *ipre = NULL, *ppre = NULL, *psuf = NULL, *prpre = NULL; char *pre = NULL, *suf = NULL, *group = NULL, *m = NULL, *rs = NULL; - char *ign = NULL, *rf = NULL; + char *ign = NULL, *rf = NULL, *expl = NULL; int f = 0, a = 0, dm; Cmatcher match = NULL; @@ -1757,6 +1757,10 @@ bin_compadd(char *name, char **argv, char *ops, int func) e = "matching specification expected after -%c"; dm = 1; break; + case 'X': + sp = &expl; + e = "string expected after -%c"; + break; case 'r': f |= CMF_REMOVE; sp = &rs; @@ -1802,7 +1806,7 @@ bin_compadd(char *name, char **argv, char *ops, int func) match = cpcmatcher(match); addmatchesptr(ipre, ppre, psuf, prpre, pre, suf, group, - rs, rf, ign, f, a, match, argv); + rs, rf, ign, f, a, match, expl, argv); freecmatcher(match); return 0; @@ -2049,8 +2053,8 @@ cond_strcl(char **a, int id) zerr("zle not loaded, zle condition not available", NULL, 0); return 1; } - i = getcpatptr(comp_strptr(&ipl, NULL), i, s, id); - if (i != -1) { + i = getcpatptr(comp_strptr(&ipl, NULL, 1), i, s, id); + if (i != -1 && i >= ipl) { ignore_prefix(i - ipl); return 1; } -- cgit 1.4.1