mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-01-23 11:22:17 +08:00
Compare commits
2 Commits
5161f3dc62
...
2826f56bc5
Author | SHA1 | Date | |
---|---|---|---|
|
2826f56bc5 | ||
|
da3dce98bb |
@ -149,6 +149,9 @@ function git-info {
|
|||||||
local dirty=0
|
local dirty=0
|
||||||
local dirty_format
|
local dirty_format
|
||||||
local dirty_formatted
|
local dirty_formatted
|
||||||
|
local tracked=0
|
||||||
|
local tracked_format
|
||||||
|
local tracked_formatted
|
||||||
local ignore_submodules
|
local ignore_submodules
|
||||||
local indexed=0
|
local indexed=0
|
||||||
local indexed_format
|
local indexed_format
|
||||||
@ -413,6 +416,13 @@ function git-info {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Format tracked.
|
||||||
|
(( tracked = dirty - untracked ))
|
||||||
|
if (( tracked > 0 )); then
|
||||||
|
zstyle -s ':prezto:module:git:info:tracked' format 'tracked_format'
|
||||||
|
zformat -f tracked_formatted "$tracked_format" "t:$tracked"
|
||||||
|
fi
|
||||||
|
|
||||||
# Format dirty and clean.
|
# Format dirty and clean.
|
||||||
if (( dirty > 0 )); then
|
if (( dirty > 0 )); then
|
||||||
zstyle -s ':prezto:module:git:info:dirty' format 'dirty_format'
|
zstyle -s ':prezto:module:git:info:dirty' format 'dirty_format'
|
||||||
@ -447,6 +457,7 @@ function git-info {
|
|||||||
"s:$action_formatted" \
|
"s:$action_formatted" \
|
||||||
"S:$stashed_formatted" \
|
"S:$stashed_formatted" \
|
||||||
"U:$unmerged_formatted" \
|
"U:$unmerged_formatted" \
|
||||||
|
"t:$tracked_formatted" \
|
||||||
"u:$untracked_formatted"
|
"u:$untracked_formatted"
|
||||||
git_info[$info_format]="$REPLY"
|
git_info[$info_format]="$REPLY"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user