diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/p10k-classic.zsh | 7 | ||||
-rw-r--r-- | config/p10k-lean-8colors.zsh | 7 | ||||
-rw-r--r-- | config/p10k-lean.zsh | 7 | ||||
-rw-r--r-- | config/p10k-rainbow.zsh | 7 |
4 files changed, 24 insertions, 4 deletions
diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index a3013932..5be4bd86 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -347,7 +347,7 @@ # Formatter for Git status. # - # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. # # You can edit the function to customize how Git status looks. # @@ -413,6 +413,11 @@ res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" fi + # Display "wip" if the latest commit's summary contains "wip" or "WIP". + if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then + res+=" ${modified}wip" + fi + # ⇣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-8colors.zsh b/config/p10k-lean-8colors.zsh index 57f1bd12..d02e3a39 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -345,7 +345,7 @@ # Formatter for Git status. # - # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. # # You can edit the function to customize how Git status looks. # @@ -411,6 +411,11 @@ res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" fi + # Display "wip" if the latest commit's summary contains "wip" or "WIP". + if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then + res+=" ${modified}wip" + fi + # ⇣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 f843f99a..aac1cc81 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -341,7 +341,7 @@ # Formatter for Git status. # - # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. # # You can edit the function to customize how Git status looks. # @@ -407,6 +407,11 @@ res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" fi + # Display "wip" if the latest commit's summary contains "wip" or "WIP". + if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then + res+=" ${modified}wip" + fi + # ⇣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 722acbdd..7671a785 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -357,7 +357,7 @@ # Formatter for Git status. # - # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. # # You can edit the function to customize how Git status looks. # @@ -414,6 +414,11 @@ res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" fi + # Display "wip" if the latest commit's summary contains "wip" or "WIP". + if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then + res+=" ${modified}wip" + fi + # ⇣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. |