1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-11 22:07:48 +08:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Paul Frederiksen
7269ecf0b3
Merge 1f4529912f into 72acd2ca90 2025-12-08 08:35:00 -08:00
Paul Frederiksen
1f4529912f 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
2025-09-29 11:37:34 -07:00

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