summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2021-04-14 14:27:10 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2021-04-15 16:27:53 +0000
commitcc833e01fef8298bc385bcff98f1b7ae85a8642a (patch)
tree7f3025ca6fa2893a8dff8713b57e29d185236386
parent9b5f80285d392b131198c6690428687d84cd49da (diff)
downloadzsh-cc833e01fef8298bc385bcff98f1b7ae85a8642a.tar.gz
zsh-cc833e01fef8298bc385bcff98f1b7ae85a8642a.zip
45583/0004: docs: Document that hook functions may rely on $? (see workers/48570).
-rw-r--r--ChangeLog3
-rw-r--r--Doc/Zsh/func.yo3
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f2f8804a2..547780dc8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2021-04-15 Daniel Shahaf <d.s@daniel.shahaf.name>
+ * 45583/0004: Doc/Zsh/func.yo: docs: Document that hook functions
+ may rely on $? (see workers/48570).
+
* 45583/0003: Doc/Zsh/contrib.yo: docs: Fix rendering in the
man page output
diff --git a/Doc/Zsh/func.yo b/Doc/Zsh/func.yo
index 0944380b9..7edad7f23 100644
--- a/Doc/Zsh/func.yo
+++ b/Doc/Zsh/func.yo
@@ -206,7 +206,8 @@ findex(hook functions)
For the functions below, it is possible to define an array that has the
same name as the function with `tt(_functions)' appended. Any element in
such an array is taken as the name of a function to execute; it is executed
-in the same context and with the same arguments as the basic function. For
+in the same context and with the same arguments and same initial value of tt($?)
+as the basic function. For
example, if tt($chpwd_functions) is an array containing the values
`tt(mychpwd)', `tt(chpwd_save_dirstack)', then the shell attempts to
execute the functions `tt(chpwd)', `tt(mychpwd)' and