Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: rewrite of completion matching



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