Print git info in a nicer way

This commit is contained in:
Ilan Cosman 2021-02-03 10:06:26 -08:00
parent 5b14255464
commit 8aedd1ddf7

View File

@ -54,28 +54,18 @@ function _tide_item_git
set -l stash (git stash list | count) || set -e stash set -l stash (git stash list | count) || set -e stash
# Print the information # Print the information
test -z "$location" && printf '%s' '@' && set location $sha if test -z "$location"
set_color $tide_git_branch_color printf '%s' '@'
printf '%s' $location set location $sha
end
set_color $tide_git_operation_color printf '%s' \
printf '%s' ' '$operation ' '$step/$totalSteps (set_color $tide_git_branch_color) $location \
(set_color $tide_git_operation_color) ' '$operation ' '$step/$totalSteps \
set_color $tide_git_upstream_color (set_color $tide_git_upstream_color) ' ⇣'$upstreamBehind ' ⇡'$upstreamAhead \
printf '%s' ' ⇣'$upstreamBehind ' ⇡'$upstreamAhead (set_color $tide_git_conflicted_color) ' ~'$conflicted \
(set_color $tide_git_staged_color) ' +'$staged \
set_color $tide_git_conflicted_color (set_color $tide_git_dirty_color) ' !'$dirty \
printf '%s' ' ~'$conflicted (set_color $tide_git_untracked_color) ' ?'$untracked \
(set_color $tide_git_stash_color) ' *'$stash
set_color $tide_git_staged_color
printf '%s' ' +'$staged
set_color $tide_git_dirty_color
printf '%s' ' !'$dirty
set_color $tide_git_untracked_color
printf '%s' ' ?'$untracked
set_color $tide_git_stash_color
printf '%s' ' *'$stash
end end