From 3c54e091f04d21a8b2db95d2a1eb6752ad56b0a0 Mon Sep 17 00:00:00 2001 From: Alex Jurkiewicz Date: Mon, 9 Dec 2019 16:53:46 +1100 Subject: [PATCH] Add example for showing the current Git commit --- config/p10k-classic.zsh | 3 +++ config/p10k-lean.zsh | 3 +++ config/p10k-rainbow.zsh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index d032ef3d..832ac3ba 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -392,6 +392,9 @@ res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % fi + # Show the git commit + # res+=" (${VCS_STATUS_COMMIT:0:5})" + # ⇣42 if behind the remote. (( 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. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 87c40923..d58cefe2 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -385,6 +385,9 @@ res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % fi + # Show the git commit + # res+=" (${VCS_STATUS_COMMIT:0:5})" + # ⇣42 if behind the remote. (( 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. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 27ec68ee..991afcfc 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -391,6 +391,9 @@ res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % fi + # Show the git commit + # res+=" (${VCS_STATUS_COMMIT:0:5})" + # ⇣42 if behind the remote. (( 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.