mirror of
https://github.com/zsh-users/zsh
synced 2024-09-15 22:20:22 +00:00
45150 + 45152: zshexpn: Use a more minimal example in the documentation of (#b).
This commit is contained in:
parent
4a2a15d8dc
commit
408e75b903
|
@ -1,3 +1,8 @@
|
|||
2019-12-28 Sebastian Gniazdowski <sgniazdowski@gmail.com>
|
||||
|
||||
* 45150 + 45152: Doc/Zsh/expn.yo: zshexpn: Use a more minimal
|
||||
example in the documentation of (#b).
|
||||
|
||||
2019-12-27 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted: Test/B01cd.ztst, Util/ztst-ftplugin.vim,
|
||||
|
|
|
@ -2264,12 +2264,13 @@ parentheses can be referenced.
|
|||
|
||||
For example,
|
||||
|
||||
example(foo="a string with a message"
|
||||
if [[ $foo = (a|an)' '(#b)(*)' '* ]]; then
|
||||
example(foo="a_string_with_a_message"
|
||||
if [[ $foo = (a|an)_(#b)(*) ]]; then
|
||||
print ${foo[$mbegin[1],$mend[1]]}
|
||||
fi)
|
||||
|
||||
prints `tt(string with a)'. Note that the first parenthesis is before the
|
||||
prints `tt(string_with_a_message)'.
|
||||
Note that the first set of parentheses is before the
|
||||
tt((#b)) and does not create a backreference.
|
||||
|
||||
Backreferences work with all forms of pattern matching other than filename
|
||||
|
|
Loading…
Reference in a new issue