From 1f4529912f6390d1c2b0f9990d72a7381cf2ae2e Mon Sep 17 00:00:00 2001 From: Paul Frederiksen Date: Mon, 29 Sep 2025 11:37:34 -0700 Subject: [PATCH] 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 --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index f4d4229cb..2b6a1483e 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -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