mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 20:00:38 +01:00
Merge pull request #62 from gregf/sep_line
Add a new option to keep the prompt in two lines or one
This commit is contained in:
@@ -106,6 +106,7 @@ or don't want to see. All options must be overridden in your **.zshrc** file.
|
||||
|--------|-------|-------|
|
||||
|`BULLETTRAIN_PROMPT_CHAR`|`\$`|Character to be show before any command
|
||||
|`BULLETTRAIN_PROMPT_ROOT`|`true`|Highlight if running as root
|
||||
|`BULLETTRAIN_PROMPT_SEP_LINE`|`true`|Make the prompt span across two lines
|
||||
|
||||
### Status
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ fi
|
||||
if [ ! -n "${BULLETTRAIN_PROMPT_ROOT+1}" ]; then
|
||||
BULLETTRAIN_PROMPT_ROOT=true
|
||||
fi
|
||||
if [ ! -n "${BULLETTRAIN_PROMPT_SEP_LINE+1}" ]; then
|
||||
BULLETTRAIN_PROMPT_SEP_LINE=true
|
||||
fi
|
||||
|
||||
# STATUS
|
||||
if [ ! -n "${BULLETTRAIN_STATUS_SHOW+1}" ]; then
|
||||
@@ -452,6 +455,10 @@ build_prompt() {
|
||||
prompt_end
|
||||
}
|
||||
|
||||
PROMPT='
|
||||
if [[ $BULLETTRAIN_PROMPT_SEP_LINE == true ]] then
|
||||
PROMPT='
|
||||
%{%f%b%k%}$(build_prompt)
|
||||
%{${fg_bold[default]}%}$(prompt_char) %{$reset_color%}'
|
||||
else
|
||||
PROMPT='%{%f%b%k%}$(build_prompt)%{${fg_bold[default]}%} $(prompt_char) %{$reset_color%}'
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user