From d28e84ca7061c43c49c91059d15b49bc5859a3a7 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 9 Mar 2021 12:20:28 +0100 Subject: [PATCH] don't display git tag when on a branch (#1294) --- config/p10k-classic.zsh | 2 +- config/p10k-lean-8colors.zsh | 2 +- config/p10k-lean.zsh | 2 +- config/p10k-rainbow.zsh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 731d6cd9..123ae9c1 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -404,7 +404,7 @@ # Display the current Git commit if there is no branch and no tag. # Tip: To always display the current Git commit, delete the next line. - [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_LOCAL_BRANCH ]] && # <-- this line + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" # Show tracking branch name if it differs from local branch. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 58a691f4..4f9d8938 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -402,7 +402,7 @@ # Display the current Git commit if there is no branch and no tag. # Tip: To always display the current Git commit, delete the next line. - [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_LOCAL_BRANCH ]] && # <-- this line + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" # Show tracking branch name if it differs from local branch. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index b5e148e0..c3ecb09d 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -398,7 +398,7 @@ # Display the current Git commit if there is no branch and no tag. # Tip: To always display the current Git commit, delete the next line. - [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_LOCAL_BRANCH ]] && # <-- this line + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" # Show tracking branch name if it differs from local branch. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 06d1426d..a47fb18e 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -405,7 +405,7 @@ # Display the current Git commit if there is no branch and no tag. # Tip: To always display the current Git commit, delete the next line. - [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_LOCAL_BRANCH ]] && # <-- this line + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" # Show tracking branch name if it differs from local branch.