1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 16:40:24 +02:00

36478: Add [[:INCOMPLETE:]] and [[:INVALID:]] pattern tests.

This commit is contained in:
Peter Stephenson 2015-09-10 20:05:48 +01:00
parent 3bca11c35c
commit e86b3cce47
6 changed files with 77 additions and 14 deletions

View file

@ -1956,6 +1956,20 @@ ifzman(the zmanref(zshparam) manual page)\
ifnzman(noderef(Parameters Used By The Shell))\
.
)
item(tt([:INCOMPLETE:]))(
Matches a byte that starts an incomplete multibyte character.
Note that there may be a sequence of more than one bytes that
taken together form the prefix of a multibyte character. To
test for a potentially incomplete byte sequence, use the pattern
`tt([[:INCOMPLETE:]]*)'. This will never match a sequence starting
with a valid multibyte character.
)
item(tt([:INVALID:]))(
Matches a byte that does not start a valid multibyte character.
Note this may be a continuation byte of an incomplete multibyte
character as any part of a multibyte string consisting of invalid and
incomplete multibyte characters is treated as single bytes.
)
item(tt([:WORD:]))(
The character is treated as part of a word; this test is sensitive
to the value of the tt(WORDCHARS) parameter