diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-09-16 15:02:01 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-09-16 15:02:01 +0000 |
commit | 2920c227d3f8e6d8af1f2b0c3163badb95cde9b5 (patch) | |
tree | 854021a4e3cfa7a72bf67a364ce55e6803ca800b /Src/Zle/compctl.c | |
parent | 14905ddc74f78b54c75434c8a4d7e029b1933280 (diff) | |
download | zsh-2920c227d3f8e6d8af1f2b0c3163badb95cde9b5.tar.gz zsh-2920c227d3f8e6d8af1f2b0c3163badb95cde9b5.tar.xz zsh-2920c227d3f8e6d8af1f2b0c3163badb95cde9b5.zip |
25677: add %x and %I prompt escapes for shell source code debugging
tidy up interface to doshfunc()
Diffstat (limited to 'Src/Zle/compctl.c')
-rw-r--r-- | Src/Zle/compctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
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"; |