fix(lib): handle Unicode characters in git branch names

Replace [^ ]+ with [^[:space:]]+ in regex pattern to properly handle
Unicode characters like Chinese characters in git branch names.

Fixes #13330
This commit is contained in:
Paul Frederiksen 2025-09-29 11:37:34 -07:00
commit 1f4529912f

View file

@ -104,7 +104,7 @@ function _omz_git_prompt_status() {
status_lines=("${(@f)${status_text}}")
# If the tracking line exists, get and parse it
if [[ "$status_lines[1]" =~ "^## [^ ]+ \[(.*)\]" ]]; then
if [[ "$status_lines[1]" =~ "^## [^[:space:]]+ \[(.*)\]" ]]; then
local branch_statuses
branch_statuses=("${(@s/,/)match}")
for branch_status in $branch_statuses; do