about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-07-17 11:27:55 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-07-17 11:27:55 +0000
commit0409391c7d08016de3f1ea8b1a74d5856669ffaa (patch)
tree08c73dd57ba775e380384f3b408cfda4446c1861 /Src/exec.c
parent4f7cf022b6963985a75c5a00ef59c7168551b225 (diff)
downloadzsh-0409391c7d08016de3f1ea8b1a74d5856669ffaa.tar.gz
zsh-0409391c7d08016de3f1ea8b1a74d5856669ffaa.tar.xz
zsh-0409391c7d08016de3f1ea8b1a74d5856669ffaa.zip
25272: add zshaddhistory hook
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 7ce657032..437a45c37 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4093,6 +4093,16 @@ loadautofn(Shfunc shf, int fksh, int autol)
 /*
  * execute a shell function
  *
+ * name is the name of the function
+ *
+ * prog is the code to execute
+ *
+ * doshargs, if set, are parameters to pass to the function,
+ * in which the first element is the function name (even if
+ * FUNCTIONARGZERO is set as this is handled inside this function).
+ *
+ * flags are a set of the PM_ flags associated with the function.
+ *
  * If noreturnval is nonzero, then reset the current return
  * value (lastval) to its value before the shell function
  * was executed.  However, in any case return the status value
@@ -4160,6 +4170,7 @@ doshfunc(char *name, Eprog prog, LinkList doshargs, int flags, int noreturnval)
 	    oargv0 = argzero;
 	    argzero = ztrdup(getdata(node));
 	}
+	/* first node contains name regardless of option */
 	node = node->next;
 	for (; node; node = node->next, x++)
 	    *x = ztrdup(getdata(node));