about summary refs log tree commit diff
path: root/Src/Zle/zle_main.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-09-16 15:02:01 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-09-16 15:02:01 +0000
commit2920c227d3f8e6d8af1f2b0c3163badb95cde9b5 (patch)
tree854021a4e3cfa7a72bf67a364ce55e6803ca800b /Src/Zle/zle_main.c
parent14905ddc74f78b54c75434c8a4d7e029b1933280 (diff)
downloadzsh-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/zle_main.c')
-rw-r--r--Src/Zle/zle_main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 4bccf2d46..dc6e07f2b 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1304,9 +1304,8 @@ execzlefunc(Thingy func, char **args, int set_bindk)
 	r = 1;
     } else {
 	Shfunc shf = (Shfunc) shfunctab->getnode(shfunctab, w->u.fnnam);
-	Eprog prog = (shf ? shf->funcdef : &dummy_eprog);
 
-	if(prog == &dummy_eprog) {
+	if (!shf) {
 	    /* the shell function doesn't exist */
 	    char *nm = nicedup(w->u.fnnam, 0);
 	    char *msg = tricat("No such shell function `", nm, "'");
@@ -1330,7 +1329,7 @@ execzlefunc(Thingy func, char **args, int set_bindk)
 	    makezleparams(0);
 	    sfcontext = SFC_WIDGET;
 	    opts[XTRACE] = 0;
-	    ret = doshfunc(w->u.fnnam, prog, largs, shf->node.flags, 1);
+	    ret = doshfunc(shf, largs, shf->node.flags, 1);
 	    opts[XTRACE] = oxt;
 	    sfcontext = osc;
 	    endparamscope();