From d901d879db76f598b2abf20376a8d0b977406d06 Mon Sep 17 00:00:00 2001 From: zxcxz7 Date: Mon, 13 Jun 2016 22:57:25 +0900 Subject: [PATCH 1/2] Add ZSH_THEME_GIT_PROMPT_GENERAL variable This variable is used to set a color for (, ), and | character. The variable also can be used in PROMPT variable to use the same color for other parts of prompt. --- zshrc.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zshrc.sh b/zshrc.sh index d4010c1e..a3a6de15 100644 --- a/zshrc.sh +++ b/zshrc.sh @@ -93,9 +93,10 @@ git_super_status() { } # Default values for the appearance of the prompt. Configure at will. -ZSH_THEME_GIT_PROMPT_PREFIX="(" -ZSH_THEME_GIT_PROMPT_SUFFIX=")" -ZSH_THEME_GIT_PROMPT_SEPARATOR="|" +export ZSH_THEME_GIT_PROMPT_GENERAL="%{$FG[007]%}" +ZSH_THEME_GIT_PROMPT_PREFIX="$ZSH_THEME_GIT_PROMPT_GENERAL(" +ZSH_THEME_GIT_PROMPT_SUFFIX="$ZSH_THEME_GIT_PROMPT_GENERAL)" +ZSH_THEME_GIT_PROMPT_SEPARATOR="$ZSH_THEME_GIT_PROMPT_GENERAL|" ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}" ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[red]%}%{●%G%}" ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[red]%}%{✖%G%}" From 3e8ce534e3a6b9f80c8d2a1b3fbb1a9bb0a62fad Mon Sep 17 00:00:00 2001 From: zxcxz7 Date: Mon, 13 Jun 2016 23:07:28 +0900 Subject: [PATCH 2/2] Add explanation for ZSH_THEME_GIT_PROMPT_GENERAL --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 668726cf..21aef098 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ There is now a Haskell implementation as well, which can be four to six times fa - You may redefine the function `git_super_status` (after the `source` statement) to adapt it to your needs (to change the order in which the information is displayed). - Define the variable `ZSH_THEME_GIT_PROMPT_CACHE` in order to enable caching. - You may also change a number of variables (which name start with `ZSH_THEME_GIT_PROMPT_`) to change the appearance of the prompt. Take a look in the file `zshrc.sh` to see how the function `git_super_status` is defined, and what variables are available. +- You may change the value of `ZSH_THEME_GIT_PROMPT_GENERAL` variable to color `(`, `)`, and `|`. Also, use this variable to use the same color for other parts of PROMPT and git status part. **Enjoy!**