1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-07-07 21:46:42 +02:00

fix(josh): escape % in branch before computing branch_size (#13835)

Co-authored-by: kapilvus <kapilvus@gmail.com>
This commit is contained in:
kapil971390
2026-07-07 14:17:59 +05:30
committed by GitHub
parent 51e98fadc9
commit 8c8782e362
+2 -1
View File
@@ -10,6 +10,7 @@ function josh_prompt {
prompt=" "
branch=$(git_current_branch)
branch="${branch//\%/%%}"
ruby_version=$(ruby_prompt_info)
path_size=${#PWD}
branch_size=${#branch}
@@ -31,7 +32,7 @@ function josh_prompt {
prompt=" $prompt"
done
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(ruby_prompt_info)%{$reset_color%} ${branch//\%/%%}"
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(ruby_prompt_info)%{$reset_color%} ${branch}"
echo $prompt
}