mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-07-17 05:51:18 +02:00
fix(josh): escape % in branch before computing branch_size (#13835)
Co-authored-by: kapilvus <kapilvus@gmail.com>
This commit is contained in:
parent
51e98fadc9
commit
8c8782e362
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue