mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-04 21:56:46 +01:00
Merge commit 'c8160f2954'
This commit is contained in:
commit
2079d8ecbe
2 changed files with 29 additions and 3 deletions
|
|
@ -185,9 +185,21 @@ function gitstatus_query"${1:-}"() {
|
|||
(( _GITSTATUS_STATE_$name == 2 )) || return
|
||||
|
||||
if [[ -z $GIT_DIR ]]; then
|
||||
[[ $dir == /* ]] || dir=${(%):-%/}/$dir
|
||||
if [[ $dir != /* ]]; then
|
||||
if [[ $PWD == /* && $PWD -ef . ]]; then
|
||||
dir=$PWD/$dir
|
||||
else
|
||||
dir=${dir:a}
|
||||
fi
|
||||
fi
|
||||
else
|
||||
[[ $GIT_DIR == /* ]] && dir=:$GIT_DIR || dir=:${(%):-%/}/$GIT_DIR
|
||||
if [[ $GIT_DIR == /* ]]; then
|
||||
dir=:$GIT_DIR
|
||||
elif [[ $PWD == /* && $PWD -ef . ]]; then
|
||||
dir=:$PWD/$GIT_DIR
|
||||
else
|
||||
dir=:${GIT_DIR:a}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $dir != (|:)/* ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue