summaryrefslogtreecommitdiff
path: root/Src/Zle/compctl.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-07 11:21:42 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-07 11:21:42 +0000
commit25ca4f8792b99cc127f04ad059e0c66cb6e0face (patch)
treec9fdf61fdddd3dd9f623b09cc011b6ae2c03e233 /Src/Zle/compctl.c
parentb24757fc343f8ff2d54fb2e5ab089d3fdab13c01 (diff)
downloadzsh-25ca4f8792b99cc127f04ad059e0c66cb6e0face.tar.gz
zsh-25ca4f8792b99cc127f04ad059e0c66cb6e0face.zip
optimise command lookup in old and new completion (user/3124)
Diffstat (limited to 'Src/Zle/compctl.c')
-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) ||