mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 20:00:38 +01:00
Add BULLETTRAIN_GIT_COLORIZE_DIRTY_COLOR to customize Git BG when in dirty mode
This commit is contained in:
@@ -190,7 +190,8 @@ or don't want to see. All options must be overridden in your **.zshrc** file.
|
|||||||
|Variable|Default|Meaning
|
|Variable|Default|Meaning
|
||||||
|--------|-------|-------|
|
|--------|-------|-------|
|
||||||
|`BULLETTRAIN_GIT_SHOW`|`true`|Show/hide that segment
|
|`BULLETTRAIN_GIT_SHOW`|`true`|Show/hide that segment
|
||||||
|`BULLETTRAIN_GIT_COLORIZE_DIRTY`|`false`|Set BULLETTRAIN_GIT_BG to yellow in dirty state
|
|`BULLETTRAIN_GIT_COLORIZE_DIRTY`|`false`|Set `BULLETTRAIN_GIT_BG` to `BULLETTRAIN_GIT_COLORIZE_DIRTY_COLOR` in dirty state
|
||||||
|
|`BULLETTRAIN_GIT_COLORIZE_DIRTY_COLOR`|`yellow`|`BULLETTRAIN_GIT_BG` in dirty state
|
||||||
|`BULLETTRAIN_GIT_BG`|`white`|Background color
|
|`BULLETTRAIN_GIT_BG`|`white`|Background color
|
||||||
|`BULLETTRAIN_GIT_FG`|`black`|Foreground color
|
|`BULLETTRAIN_GIT_FG`|`black`|Foreground color
|
||||||
|`BULLETTRAIN_GIT_EXTENDED`|`true`|
|
|`BULLETTRAIN_GIT_EXTENDED`|`true`|
|
||||||
|
|||||||
@@ -137,6 +137,9 @@ fi
|
|||||||
if [ ! -n "${BULLETTRAIN_GIT_COLORIZE_DIRTY+1}" ]; then
|
if [ ! -n "${BULLETTRAIN_GIT_COLORIZE_DIRTY+1}" ]; then
|
||||||
BULLETTRAIN_GIT_COLORIZE_DIRTY=false
|
BULLETTRAIN_GIT_COLORIZE_DIRTY=false
|
||||||
fi
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_COLORIZE_DIRTY_COLOR+1}" ]; then
|
||||||
|
BULLETTRAIN_GIT_COLORIZE_DIRTY_COLOR=yellow
|
||||||
|
fi
|
||||||
if [ ! -n "${BULLETTRAIN_GIT_BG+1}" ]; then
|
if [ ! -n "${BULLETTRAIN_GIT_BG+1}" ]; then
|
||||||
BULLETTRAIN_GIT_BG=white
|
BULLETTRAIN_GIT_BG=white
|
||||||
fi
|
fi
|
||||||
@@ -294,7 +297,7 @@ prompt_git() {
|
|||||||
|
|
||||||
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
||||||
if [[ $BULLETTRAIN_GIT_COLORIZE_DIRTY == true && $(git status --porcelain --ignore-submodules) ]]; then
|
if [[ $BULLETTRAIN_GIT_COLORIZE_DIRTY == true && $(git status --porcelain --ignore-submodules) ]]; then
|
||||||
BULLETTRAIN_GIT_BG=yellow
|
BULLETTRAIN_GIT_BG=$BULLETTRAIN_GIT_COLORIZE_DIRTY_COLOR
|
||||||
fi
|
fi
|
||||||
prompt_segment $BULLETTRAIN_GIT_BG $BULLETTRAIN_GIT_FG
|
prompt_segment $BULLETTRAIN_GIT_BG $BULLETTRAIN_GIT_FG
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user