about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compctl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c
index 0e1dc088c..c7356b69f 100644
--- a/Src/Zle/compctl.c
+++ b/Src/Zle/compctl.c
@@ -2469,7 +2469,7 @@ makecomplistcmd(char *os, int incmd, int flags)
     return ret;
 }
 
-/* This add the matches for the pattern compctls. */
+/* This adds the matches for the pattern compctls. */
 
 /**/
 static int
@@ -2477,9 +2477,12 @@ makecomplistpc(char *os, int incmd)
 {
     Patcomp pc;
     Patprog pat;
-    char *s = findcmd(cmdstr, 1);
+    char *s;
     int ret = 0;
 
+    s = ((shfunctab->getnode(shfunctab, cmdstr) ||
+	  builtintab->getnode(builtintab, cmdstr)) ? NULL : findcmd(cmdstr, 1));
+
     for (pc = patcomps; pc; pc = pc->next) {
 	if ((pat = patcompile(pc->pat, PAT_STATIC, NULL)) &&
 	    (pattry(pat, cmdstr) ||