about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2020-03-19 18:00:16 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2020-03-22 02:23:53 +0000
commit386d9ac8ff961b8f0333d09511e927ab31011658 (patch)
tree442bdeb53c2f867ab5c5878dd1c45ea49dbd6c76 /Doc
parenta3c6c5513dcfc25d952735449bf6da476d905184 (diff)
downloadzsh-386d9ac8ff961b8f0333d09511e927ab31011658.tar.gz
zsh-386d9ac8ff961b8f0333d09511e927ab31011658.tar.xz
zsh-386d9ac8ff961b8f0333d09511e927ab31011658.zip
45583/0008: Add the 'function -T' syntax.
Config/version.mk was bumped in the previous commit.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/grammar.yo13
1 files changed, 12 insertions, 1 deletions
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index e028c8512..fa0d72ff5 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -357,7 +357,7 @@ deliberately left unspecified, because historically there was a mismatch between
 the documented and implemented behaviours.  Cf. 20076, 21734/21735, 45075.)
 )
 findex(function)
-xitem(tt(function) var(word) ... [ tt(()) ] [ var(term) ] tt({) var(list) tt(}))
+xitem(tt(function) [ tt(-T) ] var(word) ... [ tt(()) ] [ var(term) ] tt({) var(list) tt(}))
 xitem(var(word) ... tt(()) [ var(term) ] tt({) var(list) tt(}))
 item(var(word) ... tt(()) [ var(term) ] var(command))(
 where var(term) is one or more newline or tt(;).
@@ -367,6 +367,17 @@ are usually only useful for setting traps.
 The body of the function is the var(list) between
 the tt({) and tt(}).  See noderef(Functions).
 
+The options of tt(function) have the following meanings:
+
+startitem()
+item(-T)(
+Enable tracing for this function, as though with tt(functions -T).  See the
+documentation of the tt(-f) option to the tt(typeset) builtin, in
+ifzman(zmanref(zshbuiltins))\
+ifnzman(noderef(Shell Builtin Commands)).
+)
+enditem()
+
 If the option tt(SH_GLOB) is set for compatibility with other shells, then
 whitespace may appear between the left and right parentheses when
 there is a single var(word);  otherwise, the parentheses will be treated as