Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: rewrite of completion matching
- X-seq: zsh-workers 25164
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: rewrite of completion matching
- Date: Mon, 16 Jun 2008 08:30:35 -0700
- In-reply-to: <20080616135405.7a2a816e@pws-pc>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <10676.1212870878@pws-pc> <080616001700.ZM8326@xxxxxxxxxxxxxxxxxxxxxx> <20080616135405.7a2a816e@pws-pc>
On Jun 16, 1:54pm, Peter Stephenson wrote:
} Subject: Re: PATCH: rewrite of completion matching
}
} On Mon, 16 Jun 2008 00:17:00 -0700
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > I *think* you mean that m:{[:punct:]}={[:space:]} is "any single
} > punctuation character matches any single whitespace character,"
} > whereas m:{[:lower:]}={[:upper:]} is "each lower case character
} > matches the corresponding upper case character." That is, the former
} > works like "sed 's/[[:punct:]]/[[:space:]]/g'" but the latter works
} > like "tr '[:lower:]' '[:upper:]'".
}
} Yes.
OK, then what do each of the following mean, and how could I figure it
out from the documentation?
m:{[:lower:][:digit:]}={[:upper:][:digit:]}
m:{[:digit:][:lower:]}={[:upper:][:digit:]}
m:{[:lower:]0-9}={[:upper:][:digit:]}
m:{[:lower:][:digit:]}={[:alnum:]}
m:{[:lower:]}={[:alpha:]}
} I missed a special case, in fact: if the classes are the same,
} then the character is forced to be the same as well.
So m:{[:alnum:]}={[:alnum:]} is effectively an expensive no-op?
Found another doc typo, by the way:
Index: Doc/Zsh/expn.yo
1426c1426
< item(tt([:lower:]))(l
---
> item(tt([:lower:]))(
Messages sorted by:
Reverse Date,
Date,
Thread,
Author