Add a new option to keep the prompt in two lines or one

This commit is contained in:
Greg Fitzgerald
2015-09-19 20:58:23 -04:00
parent 0adeb1c9d8
commit 05f78e0384

View File

@@ -22,6 +22,9 @@ fi
if [ ! -n "${BULLETTRAIN_PROMPT_ROOT+1}" ]; then if [ ! -n "${BULLETTRAIN_PROMPT_ROOT+1}" ]; then
BULLETTRAIN_PROMPT_ROOT=true BULLETTRAIN_PROMPT_ROOT=true
fi fi
if [ ! -n "${BULLETTRAIN_PROMPT_SEP_LINE+1}" ]; then
BULLETTRAIN_PROMPT_SEP_LINE=true
fi
# STATUS # STATUS
if [ ! -n "${BULLETTRAIN_STATUS_SHOW+1}" ]; then if [ ! -n "${BULLETTRAIN_STATUS_SHOW+1}" ]; then
@@ -449,6 +452,10 @@ build_prompt() {
prompt_end prompt_end
} }
PROMPT=' if [[ $BULLETTRAIN_PROMPT_SEP_LINE == true ]] then
PROMPT='
%{%f%b%k%}$(build_prompt) %{%f%b%k%}$(build_prompt)
%{${fg_bold[default]}%}$(prompt_char) %{$reset_color%}' %{${fg_bold[default]}%}$(prompt_char) %{$reset_color%}'
else
PROMPT='%{%f%b%k%}$(build_prompt)%{${fg_bold[default]}%} $(prompt_char) %{$reset_color%}'
fi