fix(branch): handle branches with `/` properly (#13063)

Co-authored-by: Takha Polat <takha.polat@bell-sw.com>
master
swivelmargarita 11 months ago committed by GitHub
parent a84a0332a8
commit c1e5ff3169
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      plugins/branch/branch.plugin.zsh

@ -8,7 +8,7 @@ function branch_prompt_info() {
while [[ "$dir" != '/' ]]; do
# Found .git directory
if [[ -d "${dir}/.git" ]]; then
branch="${"$(<"${dir}/.git/HEAD")"##*/}"
branch="${"$(<"${dir}/.git/HEAD")"##ref: refs/heads/}"
echo '±' "${branch:gs/%/%%}"
return
fi

Loading…
Cancel
Save