about summary refs log tree commit diff
path: root/Src/cond.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-05-29 14:16:02 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-05-29 14:16:02 +0000
commit29b7123647bc3b70911bbb2caf85238d22d160c8 (patch)
tree7385597437e723b4471a6bd1061a5a2fdd2b7017 /Src/cond.c
parent3fbbdf245b7367c4b34492b630450c004a43eed7 (diff)
downloadzsh-29b7123647bc3b70911bbb2caf85238d22d160c8.tar.gz
zsh-29b7123647bc3b70911bbb2caf85238d22d160c8.tar.xz
zsh-29b7123647bc3b70911bbb2caf85238d22d160c8.zip
23485: feature completion and autoloading
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*/