ohmyzsh / ohmyzsh

🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.

Home Page:https://ohmyz.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

omz_urlencode:45: pcre_exec() error [-10]

alps2006 opened this issue · comments

Describe the bug

omz_urlencode cause omz_urlencode:45: pcre_exec() error [-10] when setting setopt rematchpcre and entering a multi-byte directory.

The file lib/termsupport.zsh can call the function omz_urlencode of lib/functions.zsh.

Steps to reproduce

~/scripts ❯ setopt rematchpcre ; omz_urlencode "你好"
omz_urlencode:45: pcre_exec() error [-10]
omz_urlencode:45: pcre_exec() error [-10]
omz_urlencode:45: pcre_exec() error [-10]
omz_urlencode:45: pcre_exec() error [-10]
omz_urlencode:45: pcre_exec() error [-10]
omz_urlencode:45: pcre_exec() error [-10]

Expected behavior

none

Screenshots and recordings

No response

OS / Linux distribution

macOS 10.15

Zsh version

5.9

Oh My Zsh version

master (803e1a7)

Terminal emulator

kitty

If using WSL on Windows, which version of WSL

None

Additional context

No response

I can't reproduce it on my system, but I think we should setopt localoptions norematchpcre. We're heavily using regexes there and it'd be great to have that more controlled. @mcornella what do you think about it?

PS: this issue reminds me to #12202, I'd say there's some issue for sure with rematchpcre and macOS...