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

Re: [PATCH] [[:blank:]] only matches on SPC and TAB



2018-05-14 07:36:11 +0100, Stephane Chazelas:
[...]
> That struck me as very odd when I found that out yesterday and
> is inconsistent with all other shells. But because that meant
> extra code was added for that, I wondered if maybe that was
> intentional.
[...]

Looking at the Changelog, I see:

Tue Oct 13 21:42:47 1998  Andrew Main  <zefram@xxxxxxx>

        * Doc/Zsh/expn.yo, Src/glob.c: Add the [:blank:] character class
          required by POSIX, which has no corresponding ctype macro.

        * Doc/Zsh/expn.yo, Misc/globtests, Src/glob.c, Src/lex.c:
          Add POSIX globbing character classes ([:alnum:] etc.).
          (pws, 4209+4212)


Which explains why it's not using isblank() and strongly
suggests that it was not intentional.

Looking at POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/isblank.html

> First released in Issue 6. Derived from the ISO/IEC 9899:1999 standard.

So it's /relatively/ recent (late 90s). Do we also need an
autoconf check for isblank() or can we assume that all systems
zsh is supported on have it?

-- 
Stephane



Messages sorted by: Reverse Date, Date, Thread, Author