mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-23 06:48:00 +00:00
Format clean when the Git repository is not dirty
This commit is contained in:
parent
bfb46ff802
commit
854c67ada4
@ -231,9 +231,6 @@ function git-info() {
|
|||||||
zformat -f stashed_formatted "$stashed_format" "S:$stashed"
|
zformat -f stashed_formatted "$stashed_format" "S:$stashed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Assume that the working copy is clean.
|
|
||||||
zstyle -s ':omz:plugin:git:prompt' clean 'clean_formatted'
|
|
||||||
|
|
||||||
while IFS=$'\n' read line; do
|
while IFS=$'\n' read line; do
|
||||||
(( line_number++ ))
|
(( line_number++ ))
|
||||||
|
|
||||||
@ -358,7 +355,8 @@ function git-info() {
|
|||||||
if (( $dirty > 0 )); then
|
if (( $dirty > 0 )); then
|
||||||
zstyle -s ':omz:plugin:git:prompt' dirty 'dirty_format'
|
zstyle -s ':omz:plugin:git:prompt' dirty 'dirty_format'
|
||||||
zformat -f dirty_formatted "$dirty_format" "D:$dirty"
|
zformat -f dirty_formatted "$dirty_format" "D:$dirty"
|
||||||
unset clean_formatted
|
else
|
||||||
|
zstyle -s ':omz:plugin:git:prompt' clean 'clean_formatted'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format prompts.
|
# Format prompts.
|
||||||
|
Loading…
Reference in New Issue
Block a user