mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-29 00:04:36 +00:00
Get branch name from VCS_INFO subsystem when collecting remote branch
This commit is contained in:
+2
-2
@@ -43,11 +43,11 @@ function +vi-git-aheadbehind() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function +vi-git-remotebranch() {
|
function +vi-git-remotebranch() {
|
||||||
local remote branch_name
|
local remote
|
||||||
|
local branch_name="${hook_com[branch]}"
|
||||||
|
|
||||||
# Are we on a remote-tracking branch?
|
# Are we on a remote-tracking branch?
|
||||||
remote=${$(command git rev-parse --verify HEAD@{upstream} --symbolic-full-name 2>/dev/null)/refs\/(remotes|heads)\/}
|
remote=${$(command git rev-parse --verify HEAD@{upstream} --symbolic-full-name 2>/dev/null)/refs\/(remotes|heads)\/}
|
||||||
branch_name=$(command git symbolic-ref --short HEAD 2>/dev/null)
|
|
||||||
|
|
||||||
if [[ -n "$POWERLEVEL9K_VCS_SHORTEN_LENGTH" ]] && [[ -n "$POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH" ]]; then
|
if [[ -n "$POWERLEVEL9K_VCS_SHORTEN_LENGTH" ]] && [[ -n "$POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH" ]]; then
|
||||||
set_default POWERLEVEL9K_VCS_SHORTEN_DELIMITER $'\U2026'
|
set_default POWERLEVEL9K_VCS_SHORTEN_DELIMITER $'\U2026'
|
||||||
|
|||||||
Reference in New Issue
Block a user