mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
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:
parent
763aab3271
commit
1f4529912f
1 changed files with 1 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ function _omz_git_prompt_status() {
|
||||||
status_lines=("${(@f)${status_text}}")
|
status_lines=("${(@f)${status_text}}")
|
||||||
|
|
||||||
# If the tracking line exists, get and parse it
|
# If the tracking line exists, get and parse it
|
||||||
if [[ "$status_lines[1]" =~ "^## [^ ]+ \[(.*)\]" ]]; then
|
if [[ "$status_lines[1]" =~ "^## [^[:space:]]+ \[(.*)\]" ]]; then
|
||||||
local branch_statuses
|
local branch_statuses
|
||||||
branch_statuses=("${(@s/,/)match}")
|
branch_statuses=("${(@s/,/)match}")
|
||||||
for branch_status in $branch_statuses; do
|
for branch_status in $branch_statuses; do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue