diff --git a/ChangeLog b/ChangeLog index 1461e25bb..c8d35876f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2022-04-30 Bart Schaefer + * unposted: Doc/Zsh/expn.yo, Etc/NEWS: Details about ${(*)...} + * 50150: Src/Modules/stat.c: Filenames need unmetafy for printing * 50149: Etc/BUGS, Src/builtin.c, Src/jobs.c: Remove all =(...) diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo index bbacc6ae4..eb8cdbae5 100644 --- a/Doc/Zsh/expn.yo +++ b/Doc/Zsh/expn.yo @@ -1498,8 +1498,9 @@ form using `tt(%%)' will remove the same matches as for `tt(##)' in reverse order. ) item(tt(*))( +pindex(EXTENDED_GLOB, enable) Enable tt(EXTENDED_GLOB) for substitution via tt(${)...tt(/)...tt(}) or -tt(${)...tt(//)...tt(}). +tt(${)...tt(//)...tt(}). Note that `tt(**)' does not disable extendedglob. ) item(tt(B))( Include the index of the beginning of the match in the result. diff --git a/NEWS b/NEWS index 1ab4f0649..d7a817c1e 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,12 @@ of CLOBBER for empty files only. It is disabled by default. A (-) expansion flag was added. It works like (n) but correctly sorts negative numbers. +The (*) expansion flag enables EXTENDED_GLOB for pattern matching. +For example, ${(*)sample/(#b)*(pat)*/${match[1]}} uses backreferences +even if EXTENDED_GLOB is not otherwise set. However, this does not +descend into nested exapansions, and doubling as (**) does not disable +EXTENDED_GLOB. + The compinit function learnt a -w option to explain why compdump runs. When run without the -i or -u options and compaudit discovers security issues, answering "y" to the "Ignore insecure ..." prompt removes the