mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-06-20 17:47:48 +02:00
fix(branch): handle branches with /
properly (#13063)
Co-authored-by: Takha Polat <takha.polat@bell-sw.com>
This commit is contained in:
parent
a84a0332a8
commit
c1e5ff3169
@ -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…
x
Reference in New Issue
Block a user