mirror of
https://github.com/zsh-users/zsh
synced 2024-07-25 04:04:52 +00:00
?## fix from 13497 and site name change from Geoff
This commit is contained in:
parent
af2ae90d25
commit
441648bf5d
|
@ -1,3 +1,9 @@
|
|||
2001-02-17 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* unposted: Doc/Zsh/metafaq.yo: site name change from Geoff.
|
||||
|
||||
* 13497: Src/pattern.c: `?##' didn't work.
|
||||
|
||||
2001-02-16 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 13495: Follow-up to 13492 to un-break "${(A)=foo=$@}".
|
||||
|
|
|
@ -42,7 +42,7 @@ item(Finland)(
|
|||
nofill(tt(ftp://ftp.funet.fi/pub/unix/shells/zsh/))
|
||||
)
|
||||
item(France)(
|
||||
nofill(tt(ftp://ftp.cenatls.cena.dgac.fr/pub/shells/zsh/))
|
||||
nofill(tt(ftp://ftp.cenatls.cena.dgac.fr/shells/zsh/))
|
||||
)
|
||||
item(Germany)(
|
||||
nofill(tt(ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/) em((H))
|
||||
|
|
|
@ -1103,13 +1103,19 @@ patcomppiece(int *flagp)
|
|||
* each time we fail on a non-empty branch, we try the empty branch,
|
||||
* which is equivalent to backtracking.
|
||||
*/
|
||||
if ((flags & P_SIMPLE) && op == P_ONEHASH &&
|
||||
if ((flags & P_SIMPLE) && (op == P_ONEHASH || op == P_TWOHASH) &&
|
||||
P_OP((Upat)patout+starter) == P_ANY) {
|
||||
/* Optimize ?# to *. Silly thing to do, since who would use
|
||||
* use ?# ? But it makes the later code shorter.
|
||||
*/
|
||||
Upat uptr = (Upat)patout + starter;
|
||||
uptr->l = (uptr->l & ~0xff) | P_STAR;
|
||||
if (op == P_TWOHASH) {
|
||||
/* ?## becomes ?* */
|
||||
uptr->l = (uptr->l & ~0xff) | P_ANY;
|
||||
pattail(starter, patnode(P_STAR));
|
||||
} else {
|
||||
uptr->l = (uptr->l & ~0xff) | P_STAR;
|
||||
}
|
||||
} else if ((flags & P_SIMPLE) && op && !(patglobflags & 0xff)) {
|
||||
/* Don't simplify if we need to look for approximations. */
|
||||
patinsert(op, starter, NULL, 0);
|
||||
|
|
Loading…
Reference in a new issue