* [PATCH] Fix [:IDENT:] vs posixidentifiers
@ 2020-12-17 15:08 Stephane Chazelas
0 siblings, 0 replies; only message in thread
From: Stephane Chazelas @ 2020-12-17 15:08 UTC (permalink / raw)
To: Zsh hackers list
$ zsh -c '[[ é = [[:IDENT:]] ]]' || echo no
no
$ zsh -o posixidentifiers -c '[[ é = [[:IDENT:]] ]]' && echo yes
yes
That should be the other way round.
From: Stephane Chazelas <stephane@chazelas.org>
Date: Thu, 17 Dec 2020 14:49:50 +0000
Subject: [PATCH] Fix [:IDENT:] vs posixidentifiers
wcsitype(c, IIDENT) should return false for non-ASCII characters
when the POSIX_IDENTIFIERS option is on, not the other way round.
---
Src/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Src/utils.c b/Src/utils.c
index 5151b89a8..2a8d677a7 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -4327,7 +4327,7 @@ wcsitype(wchar_t c, int itype)
} else {
switch (itype) {
case IIDENT:
- if (!isset(POSIXIDENTIFIERS))
+ if (isset(POSIXIDENTIFIERS))
return 0;
return iswalnum(c);
--
2.29.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-17 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 15:08 [PATCH] Fix [:IDENT:] vs posixidentifiers Stephane Chazelas
zsh-workers
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.vuxu.org/zsh-workers
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
zsh-workers@zsh.org
public-inbox-index zsh-workers
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.vuxu.org/vuxu.archive.zsh.workers
code repositories for the project(s) associated with this inbox:
https://git.vuxu.org/mirror/zsh/
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git