summaryrefslogtreecommitdiff
path: root/Src/cond.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/cond.c')
-rw-r--r--Src/cond.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Src/cond.c b/Src/cond.c
index a597587b6..4356e5d66 100644
--- a/Src/cond.c
+++ b/Src/cond.c
@@ -95,15 +95,12 @@ evalcond(Estate state, char *fromtest)
case COND_REGEX:
{
char *modname = isset(REMATCHPCRE) ? "zsh/pcre" : "zsh/regex";
- /*
- * TODO: we just need to load the appropriate condition.
- */
- if (load_module_silence(modname, NULL, 1) == 1) {
+ sprintf(overridename = overridebuf, "-%s-match", modname+4);
+ if (ensurefeature(modname, "c:", overridename+1)) {
zwarnnam(fromtest, "%s not available for regex",
modname);
return 2;
}
- sprintf(overridename = overridebuf, "-%s-match", modname+4);
ctype = COND_MODI;
}
/*FALLTHROUGH*/