c1e5ff31693f391a0bbb30b12c8e7bc1cc976b7b
- Author
- swivelmargarita <55573157+swivelmargarita@users.noreply.github.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
fix(branch): handle branches with `/` properly (#13063)
Co-authored-by: Takha Polat <takha.polat@bell-sw.com>
Diff
1diff --git a/plugins/branch/branch.plugin.zsh b/plugins/branch/branch.plugin.zsh
2index dd5871fdc3b3ff7c7d037bdb67c2e79fecdec9e6..c24f9098e8b4a4a05bbe9ff33b4058627feb777e 100644
3--- a/plugins/branch/branch.plugin.zsh
4+++ b/plugins/branch/branch.plugin.zsh
5@@ -8,7 +8,7 @@ function branch_prompt_info() {
6 while [[ "$dir" != '/' ]]; do
7 # Found .git directory
8 if [[ -d "${dir}/.git" ]]; then
9- branch="${"$(<"${dir}/.git/HEAD")"##*/}"
10+ branch="${"$(<"${dir}/.git/HEAD")"##ref: refs/heads/}"
11 echo '±' "${branch:gs/%/%%}"
12 return
13 fi