mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 11:50:38 +01:00
Updates README
This commit is contained in:
@@ -54,6 +54,13 @@ ZSH_THEME="bullet-train"
|
|||||||
Bullet Train is configurable. You can change colors and which segments you want
|
Bullet Train is configurable. You can change colors and which segments you want
|
||||||
or don't want to see. All options must be overridden in your **.zshrc** file.
|
or don't want to see. All options must be overridden in your **.zshrc** file.
|
||||||
|
|
||||||
|
The character used for prompt and if you be warned when running as root:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
BULLETTRAIN_PROMPT_CHAR="\$"
|
||||||
|
BULLETTRAIN_PROMPT_ROOT=true
|
||||||
|
```
|
||||||
|
|
||||||
The status segment backgound, foreground color and visibility:
|
The status segment backgound, foreground color and visibility:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
|
|
||||||
VIRTUAL_ENV_DISABLE_PROMPT=true
|
VIRTUAL_ENV_DISABLE_PROMPT=true
|
||||||
|
|
||||||
|
BULLETTRAIN_PROMPT_CHAR="\$"
|
||||||
|
BULLETTRAIN_PROMPT_ROOT=true
|
||||||
|
|
||||||
BULLETTRAIN_STATUS_BG=black
|
BULLETTRAIN_STATUS_BG=black
|
||||||
BULLETTRAIN_STATUS_FG=default
|
BULLETTRAIN_STATUS_FG=default
|
||||||
|
|
||||||
@@ -263,20 +266,18 @@ prompt_status() {
|
|||||||
[[ -n "$symbols" ]] && prompt_segment $BULLETTRAIN_STATUS_BG $BULLETTRAIN_STATUS_FG "$symbols"
|
[[ -n "$symbols" ]] && prompt_segment $BULLETTRAIN_STATUS_BG $BULLETTRAIN_STATUS_FG "$symbols"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prompt Character:
|
# Prompt Character
|
||||||
# should we show a basic '$' char
|
|
||||||
# or colored (red/green) different
|
|
||||||
# chars for root/normal prompt?
|
|
||||||
prompt_char() {
|
prompt_char() {
|
||||||
local bt_prompt_char
|
local bt_prompt_char
|
||||||
|
|
||||||
if [[ ${#BULLETTRAIN_PROMPT_CHAR} -eq 1 ]] then
|
if [[ ${#BULLETTRAIN_PROMPT_CHAR} -eq 1 ]] then
|
||||||
bt_prompt_char="${BULLETTRAIN_PROMPT_CHAR}"
|
bt_prompt_char="${BULLETTRAIN_PROMPT_CHAR}"
|
||||||
else
|
|
||||||
bt_prompt_char="\$"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $BULLETTRAIN_PROMPT_ROOT == true ]] then
|
if [[ $BULLETTRAIN_PROMPT_ROOT == true ]] then
|
||||||
bt_prompt_char="%(!.%F{red}#.%F{green}${bt_prompt_char})"
|
bt_prompt_char="%(!.%F{red}#.%F{green}${bt_prompt_char})"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n $bt_prompt_char
|
echo -n $bt_prompt_char
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user