1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-04-10 16:32:00 +00:00
Files
ohmyzsh-mirror/lib/tests
Green Orange 1d04379d4f fix(git-lib): avoid regex error with non-ASCII branch names
_omz_git_prompt_status was emitting "regex matching error: illegal byte
sequence" when the git branch name contained non-ASCII characters (e.g.
Chinese). The zsh =~ operator uses locale-aware POSIX ERE, so character
classes like [^ ]+ reject multibyte sequences unless LC_ALL=C is set.
Fix by setting LC_ALL=C around all regex operations in the function and
restoring it afterwards.

Fixes #13330
2026-04-06 00:27:33 +02:00
..