mirror of
https://github.com/zsh-users/zsh
synced 2024-09-16 06:30:26 +00:00
42790: make [[:blank:]] match non-ASCII blanks
This commit is contained in:
parent
afec5fb136
commit
5ac1c6f555
|
@ -1,5 +1,8 @@
|
|||
2018-05-17 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||
|
||||
* Stephane: 42790: Doc/Zsh/expn.yo, NEWS, Src/pattern.c,
|
||||
configure.ac: make [[:blank:]] match non-ASCII blanks
|
||||
|
||||
* 42784: Completion/Zsh/Command/_typeset: complete -s and -x
|
||||
options to the functions builtin
|
||||
|
||||
|
|
|
@ -2004,7 +2004,7 @@ The character is 7-bit, i.e. is a single-byte character without
|
|||
the top bit set.
|
||||
)
|
||||
item(tt([:blank:]))(
|
||||
The character is either space or tab
|
||||
The character is a blank character
|
||||
)
|
||||
item(tt([:cntrl:]))(
|
||||
The character is a control character
|
||||
|
|
9
NEWS
9
NEWS
|
@ -4,7 +4,14 @@ CHANGES FROM PREVIOUS VERSIONS OF ZSH
|
|||
|
||||
Note also the list of incompatibilities in the README file.
|
||||
|
||||
Changes from %.5 to 5.5.1
|
||||
Changes from 5.5.1 to FIXME
|
||||
---------------------------
|
||||
|
||||
In shell patterns, [[:blank:]] now honours the locale instead of
|
||||
matching exclusively on space and tab, like for the other POSIX
|
||||
character classes or for extended regular expressions.
|
||||
|
||||
Changes from 5.5 to 5.5.1
|
||||
-------------------------
|
||||
|
||||
Apart from a fix for a configuration problem finding singal names from
|
||||
|
|
|
@ -3605,7 +3605,15 @@ mb_patmatchrange(char *range, wchar_t ch, int zmb_ind, wint_t *indptr, int *mtp)
|
|||
return 1;
|
||||
break;
|
||||
case PP_BLANK:
|
||||
if (ch == L' ' || ch == L'\t')
|
||||
#if !defined(HAVE_ISWBLANK) && !defined(iswblank)
|
||||
/*
|
||||
* iswblank() is GNU and C99. There's a remote chance that some
|
||||
* systems still don't support it (but would support the other ones
|
||||
* if MULTIBYTE_SUPPORT is enabled).
|
||||
*/
|
||||
#define iswblank(c) (c == L' ' || c == L'\t')
|
||||
#endif
|
||||
if (iswblank(ch))
|
||||
return 1;
|
||||
break;
|
||||
case PP_CNTRL:
|
||||
|
@ -3840,7 +3848,14 @@ patmatchrange(char *range, int ch, int *indptr, int *mtp)
|
|||
return 1;
|
||||
break;
|
||||
case PP_BLANK:
|
||||
if (ch == ' ' || ch == '\t')
|
||||
#if !defined(HAVE_ISBLANK) && !defined(isblank)
|
||||
/*
|
||||
* isblank() is GNU and C99. There's a remote chance that some
|
||||
* systems still don't support it.
|
||||
*/
|
||||
#define isblank(c) (c == ' ' || c == '\t')
|
||||
#endif
|
||||
if (isblank(ch))
|
||||
return 1;
|
||||
break;
|
||||
case PP_CNTRL:
|
||||
|
|
|
@ -1304,6 +1304,7 @@ AC_CHECK_FUNCS(strftime strptime mktime timelocal \
|
|||
memcpy memmove strstr strerror strtoul \
|
||||
getrlimit getrusage \
|
||||
setlocale \
|
||||
isblank iswblank \
|
||||
uname \
|
||||
signgam tgamma \
|
||||
scalbn \
|
||||
|
@ -2564,6 +2565,12 @@ AC_HELP_STRING([--enable-multibyte], [support multibyte characters]),
|
|||
[AC_CACHE_VAL(zsh_cv_c_unicode_support,
|
||||
AC_MSG_NOTICE([checking for functions supporting multibyte characters])
|
||||
[zfuncs_absent=
|
||||
dnl
|
||||
dnl Note that iswblank is not included and checked separately.
|
||||
dnl As iswblank() was added to C long after the others, we still
|
||||
dnl want to enabled unicode support even if iswblank is not available
|
||||
dnl (we then just do the SPC+TAB approximation)
|
||||
dnl
|
||||
for zfunc in iswalnum iswcntrl iswdigit iswgraph iswlower iswprint \
|
||||
iswpunct iswspace iswupper iswxdigit mbrlen mbrtowc towupper towlower \
|
||||
wcschr wcscpy wcslen wcsncmp wcsncpy wcrtomb wcwidth wmemchr wmemcmp \
|
||||
|
|
Loading…
Reference in a new issue