mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-17 10:10:07 +00:00
Add example for showing the current Git commit
This commit is contained in:
parent
345d0644a9
commit
3c54e091f0
3 changed files with 9 additions and 0 deletions
|
@ -392,6 +392,9 @@
|
||||||
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
|
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Show the git commit
|
||||||
|
# res+=" (${VCS_STATUS_COMMIT:0:5})"
|
||||||
|
|
||||||
# ⇣42 if behind the remote.
|
# ⇣42 if behind the remote.
|
||||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||||
|
|
|
@ -385,6 +385,9 @@
|
||||||
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
|
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Show the git commit
|
||||||
|
# res+=" (${VCS_STATUS_COMMIT:0:5})"
|
||||||
|
|
||||||
# ⇣42 if behind the remote.
|
# ⇣42 if behind the remote.
|
||||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||||
|
|
|
@ -391,6 +391,9 @@
|
||||||
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
|
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Show the git commit
|
||||||
|
# res+=" (${VCS_STATUS_COMMIT:0:5})"
|
||||||
|
|
||||||
# ⇣42 if behind the remote.
|
# ⇣42 if behind the remote.
|
||||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||||
|
|
Loading…
Reference in a new issue