diff options
Diffstat (limited to 'Misc/vcs_info-examples')
-rw-r--r-- | Misc/vcs_info-examples | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Misc/vcs_info-examples b/Misc/vcs_info-examples index 456b3a85b..6cf87f5f8 100644 --- a/Misc/vcs_info-examples +++ b/Misc/vcs_info-examples @@ -138,7 +138,7 @@ zstyle ':vcs_info:git*' formats "(%s)-[%12.12i %b]-" # hash & branch ### Fetch the full 40-character Mercurial revision id # There is no great way to obtain branch, local rev, and untracked changes in # addition to the full 40-character global rev id with a single invocation of -# Mercurial. This hook obtains the full global rev id using hexdump (in the +# Mercurial. This hook obtains the full global rev id using xxd(1) (in the # same way the use-simple flag does) while retaining all the other vcs_info # default functionality and information. zstyle ':vcs_info:hg*+set-message:*' hooks hg-fullglobalrev @@ -146,7 +146,7 @@ zstyle ':vcs_info:hg*+set-message:*' hooks hg-fullglobalrev # Output the full 40-char global rev id function +vi-hg-fullglobalrev() { local dirstatefile="${hook_com[base]}/.hg/dirstate" - local grevid="$(hexdump -n 20 -e '1/1 "%02x"' ${dirstatefile})" + local grevid="$(xxd -p -l 20 < ${dirstatefile})" # Omit %h from your hgrevformat since it will be included below hook_com[revision]="${hook_com[revision]} ${grevid}" } |