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

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



I agree with Daniel here.

Although I think I would prefer a [[:blank:]] that consistently
matches SPC and TAB rather than something completely random
ranging from SPC and TAB (the minimum required by POSIX) and
whatever [[:space:]] matches (POSIX requires [:blank:] to be a
subset of [:space:]), I don't think it's zsh's role to fix the
POSIX character classes.

There's also the question of the consistency between

[[ $x = [[:blank:]] ]] (using zsh's own pattern matching
implementation)

[[ $x =~ [[:blank:]] ]] (using the system's EREs, so generally
influenced by the locale)

and the same with rematchpcre, that one only matching SPC and TAB
regardless of the locale AFAICT with all the character classes
only matching the minimum ASCII characters required by POSIX (as
if using the C locale with wildcards or ERE).

-- 
Stephane



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