From 2920c227d3f8e6d8af1f2b0c3163badb95cde9b5 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 16 Sep 2008 15:02:01 +0000 Subject: 25677: add %x and %I prompt escapes for shell source code debugging tidy up interface to doshfunc() --- Src/Zle/compctl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Src/Zle/compctl.c') diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c index 57bfccd49..9d03635ff 100644 --- a/Src/Zle/compctl.c +++ b/Src/Zle/compctl.c @@ -3635,12 +3635,12 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd) } if (cc->func) { /* This handles the compctl -K flag. */ - Eprog prog; + Shfunc shfunc; char **r; int lv = lastval; /* Get the function. */ - if ((prog = getshfunc(cc->func)) != &dummy_eprog) { + if ((shfunc = getshfunc(cc->func))) { /* We have it, so build a argument list. */ LinkList args = newlinklist(); int osc = sfcontext; @@ -3664,7 +3664,7 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd) incompctlfunc = 1; sfcontext = SFC_COMPLETE; /* Call the function. */ - doshfunc(cc->func, prog, args, 0, 1); + doshfunc(shfunc, args, 0, 1); sfcontext = osc; incompctlfunc = 0; /* And get the result from the reply parameter. */ @@ -3809,12 +3809,12 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd) /* generate the user-defined display list: if anything fails, * * we silently allow the normal completion list to be used. */ char **yaptr = NULL, *uv = NULL; - Eprog prog; + Shfunc shfunc; if (cc->ylist[0] == '$' || cc->ylist[0] == '(') { /* from variable */ uv = cc->ylist + (cc->ylist[0] == '$'); - } else if ((prog = getshfunc(cc->ylist)) != &dummy_eprog) { + } else if ((shfunc = getshfunc(cc->ylist))) { /* from function: pass completions as arg list */ LinkList args = newlinklist(); LinkNode ln; @@ -3839,7 +3839,7 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd) if (incompfunc != 1) incompctlfunc = 1; sfcontext = SFC_COMPLETE; - doshfunc(cc->ylist, prog, args, 0, 1); + doshfunc(shfunc, args, 0, 1); sfcontext = osc; incompctlfunc = 0; uv = "reply"; -- cgit 1.4.1