about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2020-01-16 18:21:41 +0000
committerDaniel Shahaf <danielsh@apache.org>2020-01-16 18:21:41 +0000
commitfb3865514ce52de5b1b2cfa34899a133e76edf78 (patch)
treea23af3c43522e1525054435b6bcf7eec3f3ee7b8
parent977e1c75d8fcd7e727d20d8e4ac9b5b79ea9d667 (diff)
parent28e11ac60b91aea5ab4b47c3cc2bf33f00ba53e4 (diff)
downloadzsh-fb3865514ce52de5b1b2cfa34899a133e76edf78.tar.gz
zsh-fb3865514ce52de5b1b2cfa34899a133e76edf78.tar.xz
zsh-fb3865514ce52de5b1b2cfa34899a133e76edf78.zip
Merge branch 'master' into 5.9
* master:
  45305: Add an XFail test: The exec-last-command optimization is applied to try/always.
  45307: zstyle docs: Unoverload a placeholder variable name.
  45306: zstyle docs: Introduce the first synopsis in the same way as all others: with an item()().
  unposted: docs: Fix a cross-reference.
-rw-r--r--ChangeLog14
-rw-r--r--Doc/Zsh/mod_zutil.yo20
-rw-r--r--Doc/Zsh/options.yo4
-rw-r--r--Doc/Zsh/params.yo2
-rw-r--r--Test/A01grammar.ztst4
5 files changed, 33 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index c317f04c5..643352dfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,20 @@
 	* 45131: Src/exec.c, Test/E02xtrace.ztst: Make a function that
 	redefines itself preserve its tracedness.
 
+2020-01-16  Daniel Shahaf  <danielsh@apache.org>
+
+	* 45305: Test/A01grammar.ztst: Add an XFail test: The
+	exec-last-command optimization is applied to try/always.
+
+	* 45307: Doc/Zsh/mod_zutil.yo: zstyle docs: Unoverload a
+	placeholder variable name.
+
+	* 45306: Doc/Zsh/mod_zutil.yo: zstyle docs: Introduce the first
+	synopsis in the same way as all others: with an item()().
+
+	* unposted: Doc/Zsh/options.yo, Doc/Zsh/params.yo: docs: Fix
+	a cross-reference.
+
 2020-01-15  Daniel Shahaf  <danielsh@apache.org>
 
 	* 45287: Doc/Zsh/expn.yo: zshexpn: Describe parameter elision
diff --git a/Doc/Zsh/mod_zutil.yo b/Doc/Zsh/mod_zutil.yo
index e556e2b37..24aebdfaf 100644
--- a/Doc/Zsh/mod_zutil.yo
+++ b/Doc/Zsh/mod_zutil.yo
@@ -7,7 +7,7 @@ The tt(zsh/zutil) module only adds some builtins:
 
 startitem()
 findex(zstyle)
-xitem(tt(zstyle) [ tt(-L) [ var(pattern) [ var(style) ] ] ])
+xitem(tt(zstyle) [ tt(-L) [ var(metapattern) [ var(style) ] ] ])
 xitem(tt(zstyle) [ tt(-e) | tt(-) | tt(-)tt(-) ] var(pattern) var(style) var(string) ...)
 xitem(tt(zstyle -d) [ var(pattern) [ var(style) ... ] ])
 xitem(tt(zstyle -g) var(name) [ var(pattern) [ var(style) ] ])
@@ -49,22 +49,24 @@ in order to retrieve your preference into the scalar variable tt($REPLY).
 
 em(Usage)
 
-The first form (without arguments) lists the definitions.  Styles
+The forms that operate on patterns are the following.
+
+startitem()
+item(tt(zstyle) [ tt(-L) [ var(metapattern) [ var(style) ] ] ])(
+Without arguments, lists style definitions.  Styles
 are shown in alphabetic order and patterns are shown in the order
 tt(zstyle) will test them.
 
 If the tt(-L) option is given, listing is done in the form of calls to
-tt(zstyle).  The optional first argument is a pattern which will be matched
-against the string supplied as the pattern for the context; note that
+tt(zstyle).  The optional first argument, var(metapattern), is a pattern which
+will be matched against the string supplied as var(pattern) when the style was
+defined.  Note:
 this means, for example, `tt(zstyle -L ":completion:*")' will
 match any supplied pattern beginning `tt(:completion:)', not
 just tt(":completion:*"):  use tt(':completion:\*') to match that.
 The optional second argument limits the output to a specific var(style) (not a
 pattern).  tt(-L) is not compatible with any other options.
-
-The other forms are the following:
-
-startitem()
+)
 item(tt(zstyle) [ tt(-) | tt(-)tt(-) | tt(-e) ] var(pattern) var(style) var(string) ...)(
 vindex(reply, use of)
 Defines the given var(style) for the var(pattern) with the var(string)s as
@@ -93,7 +95,7 @@ combination is returned.
 )
 enditem()
 
-The other forms can be used to look up or test patterns.
+The other forms can be used to look up or test styles for a given context.
 
 startitem()
 item(tt(zstyle -s) var(context) var(style) var(name) [ var(sep) ])(
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index 88bb643d1..fdea51412 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -2334,7 +2334,9 @@ cindex(sh, field splitting style)
 item(tt(SH_WORD_SPLIT) (tt(-y)) <K> <S>)(
 Causes field splitting to be performed on unquoted parameter expansions.
 Note that this option has nothing to do with word splitting.
-(See noderef(Parameter Expansion).)
+(See 
+ifzman(zmanref(zshexpn))\
+ifnzman(noderef(Parameter Expansion)).)
 )
 pindex(TRAPS_ASYNC)
 pindex(NO_TRAPS_ASYNC)
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index 5025ef477..8daf33d5e 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -129,7 +129,7 @@ both var(key) and var(value) undergo all forms of expansion
 allowed for single word shell expansions (this does not include filename
 generation); these are as performed by the parameter expansion flag
 tt(LPAR()e+RPAR()) as described in
-ifzman(zmanref(zshparam))\
+ifzman(zmanref(zshexpn))\
 ifnzman(noderef(Parameter Expansion)).
 Nested parentheses may surround var(value) and are included as part of the
 value, which is joined into a plain string; this differs from ksh which
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst
index d3a591761..1e0e9a04e 100644
--- a/Test/A01grammar.ztst
+++ b/Test/A01grammar.ztst
@@ -928,3 +928,7 @@ F:Note that the behaviour of 'exit' inside try-list inside a function is unspeci
 >PIPE
 >and true
 >or false
+
+ $ZTST_testdir/../Src/zsh -fc '{ ( ) } always { echo foo }'
+-f:exec last command optimization inhibited for try/always
+>foo