Skip to content

Commit 1ff1099

Browse files
jboulter11belak
authored andcommitted
Allow users to set a dirty-branch format
1 parent 98d69fc commit 1ff1099

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/git/functions/git-info

+5
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,11 @@ function git-info {
417417
if (( dirty > 0 )); then
418418
zstyle -s ':prezto:module:git:info:dirty' format 'dirty_format'
419419
zformat -f dirty_formatted "$dirty_format" "D:$dirty"
420+
# Overwrite branch format to use dirty-branch format
421+
zstyle -s ':prezto:module:git:info:dirty-branch' format 'branch_format'
422+
if [[ -n "$branch" && -n "$branch_format" ]]; then
423+
zformat -f branch_formatted "$branch_format" "b:$branch"
424+
fi
420425
else
421426
zstyle -s ':prezto:module:git:info:clean' format 'clean_formatted'
422427
fi

0 commit comments

Comments
 (0)