mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
Always expand GIT_DIR to absolute path
This commit is contained in:
parent
983d9a4480
commit
20de3ac8fd
1 changed files with 4 additions and 4 deletions
|
@ -1648,7 +1648,7 @@ function _p9k_vcs_style() {
|
||||||
function _p9k_vcs_render() {
|
function _p9k_vcs_render() {
|
||||||
if [[ -v _P9K_NEXT_VCS_DIR ]]; then
|
if [[ -v _P9K_NEXT_VCS_DIR ]]; then
|
||||||
local -a msg
|
local -a msg
|
||||||
local dir=${GIT_DIR:-$PWD}
|
local dir=${${GIT_DIR:a}:-$PWD}
|
||||||
while true; do
|
while true; do
|
||||||
msg=("${(@0)${_P9K_LAST_GIT_PROMPT[$dir]}}")
|
msg=("${(@0)${_P9K_LAST_GIT_PROMPT[$dir]}}")
|
||||||
[[ $#msg != 0 || $dir == / ]] && break
|
[[ $#msg != 0 || $dir == / ]] && break
|
||||||
|
@ -1832,9 +1832,9 @@ function _p9k_vcs_gitstatus() {
|
||||||
[[ $POWERLEVEL9K_DISABLE_GITSTATUS == true ]] && return 1
|
[[ $POWERLEVEL9K_DISABLE_GITSTATUS == true ]] && return 1
|
||||||
if [[ $_P9K_REFRESH_REASON == precmd ]]; then
|
if [[ $_P9K_REFRESH_REASON == precmd ]]; then
|
||||||
if [[ -v _P9K_NEXT_VCS_DIR ]]; then
|
if [[ -v _P9K_NEXT_VCS_DIR ]]; then
|
||||||
typeset -gH _P9K_NEXT_VCS_DIR=${GIT_DIR:-$PWD}
|
typeset -gH _P9K_NEXT_VCS_DIR=${${GIT_DIR:a}:-$PWD}
|
||||||
else
|
else
|
||||||
local dir=${GIT_DIR:-$PWD}
|
local dir=${${GIT_DIR:a}:-$PWD}
|
||||||
local -F timeout=$POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS
|
local -F timeout=$POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS
|
||||||
while true; do
|
while true; do
|
||||||
case "$_P9K_GIT_SLOW[$dir]" in
|
case "$_P9K_GIT_SLOW[$dir]" in
|
||||||
|
@ -1844,7 +1844,7 @@ function _p9k_vcs_gitstatus() {
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
typeset -gFH _P9K_GITSTATUS_START_TIME=$EPOCHREALTIME
|
typeset -gFH _P9K_GITSTATUS_START_TIME=$EPOCHREALTIME
|
||||||
gitstatus_query -d ${GIT_DIR:-$PWD} -t $timeout -c _p9k_vcs_resume POWERLEVEL9K || return 1
|
gitstatus_query -d ${${GIT_DIR:a}:-$PWD} -t $timeout -c _p9k_vcs_resume POWERLEVEL9K || return 1
|
||||||
[[ $VCS_STATUS_RESULT == tout ]] && typeset -gH _P9K_NEXT_VCS_DIR=""
|
[[ $VCS_STATUS_RESULT == tout ]] && typeset -gH _P9K_NEXT_VCS_DIR=""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue