Add missing semicolons in if statements

This commit is contained in:
Greg Fitzgerald
2015-09-20 18:03:15 -04:00
parent 0adeb1c9d8
commit a9f61184d0

View File

@@ -257,7 +257,7 @@ prompt_context() {
# Git # Git
prompt_git() { prompt_git() {
if [[ $BULLETTRAIN_GIT_SHOW == false ]] then if [[ $BULLETTRAIN_GIT_SHOW == false ]]; then
return return
fi fi
@@ -267,7 +267,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
prompt_segment $BULLETTRAIN_GIT_BG $BULLETTRAIN_GIT_FG prompt_segment $BULLETTRAIN_GIT_BG $BULLETTRAIN_GIT_FG
if [[ $BULLETTRAIN_GIT_EXTENDED == true ]] then if [[ $BULLETTRAIN_GIT_EXTENDED == true ]]; then
echo -n $(git_prompt_info)$(git_prompt_status) echo -n $(git_prompt_info)$(git_prompt_status)
else else
echo -n $(git_prompt_info) echo -n $(git_prompt_info)
@@ -312,7 +312,7 @@ prompt_hg() {
# Dir: current working directory # Dir: current working directory
prompt_dir() { prompt_dir() {
if [[ $BULLETTRAIN_DIR_SHOW == false ]] then if [[ $BULLETTRAIN_DIR_SHOW == false ]]; then
return return
fi fi
@@ -338,7 +338,7 @@ prompt_dir() {
# RVM: only shows RUBY info if on a gemset that is not the default one # RVM: only shows RUBY info if on a gemset that is not the default one
# RBENV: shows current ruby version active in the shell # RBENV: shows current ruby version active in the shell
prompt_ruby() { prompt_ruby() {
if [[ $BULLETTRAIN_RUBY_SHOW == false ]] then if [[ $BULLETTRAIN_RUBY_SHOW == false ]]; then
return return
fi fi
@@ -354,7 +354,7 @@ prompt_ruby() {
# Virtualenv: current working virtualenv # Virtualenv: current working virtualenv
prompt_virtualenv() { prompt_virtualenv() {
if [[ $BULLETTRAIN_VIRTUALENV_SHOW == false ]] then if [[ $BULLETTRAIN_VIRTUALENV_SHOW == false ]]; then
return return
fi fi
@@ -366,7 +366,7 @@ prompt_virtualenv() {
# NVM: Node version manager # NVM: Node version manager
prompt_nvm() { prompt_nvm() {
if [[ $BULLETTRAIN_NVM_SHOW == false ]] then if [[ $BULLETTRAIN_NVM_SHOW == false ]]; then
return return
fi fi
@@ -380,11 +380,11 @@ prompt_nvm() {
} }
prompt_time() { prompt_time() {
if [[ $BULLETTRAIN_TIME_SHOW == false ]] then if [[ $BULLETTRAIN_TIME_SHOW == false ]]; then
return return
fi fi
if [[ $BULLETTRAIN_TIME_12HR == true ]] then if [[ $BULLETTRAIN_TIME_12HR == true ]]; then
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r} prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r}
else else
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%X} prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%X}
@@ -396,7 +396,7 @@ prompt_time() {
# - am I root # - am I root
# - are there background jobs? # - are there background jobs?
prompt_status() { prompt_status() {
if [[ $BULLETTRAIN_STATUS_SHOW == false ]] then if [[ $BULLETTRAIN_STATUS_SHOW == false ]]; then
return return
fi fi
@@ -407,9 +407,9 @@ prompt_status() {
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡%f" [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡%f"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="⚙" [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="⚙"
if [[ -n "$symbols" && $RETVAL -ne 0 ]] then if [[ -n "$symbols" && $RETVAL -ne 0 ]]; then
prompt_segment $BULLETTRAIN_STATUS_ERROR_BG $BULLETTRAIN_STATUS_FG "$symbols" prompt_segment $BULLETTRAIN_STATUS_ERROR_BG $BULLETTRAIN_STATUS_FG "$symbols"
elif [[ -n "$symbols" ]] then elif [[ -n "$symbols" ]]; then
prompt_segment $BULLETTRAIN_STATUS_BG $BULLETTRAIN_STATUS_FG "$symbols" prompt_segment $BULLETTRAIN_STATUS_BG $BULLETTRAIN_STATUS_FG "$symbols"
fi fi
@@ -419,11 +419,11 @@ prompt_status() {
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}"
fi fi
if [[ $BULLETTRAIN_PROMPT_ROOT == true ]] then if [[ $BULLETTRAIN_PROMPT_ROOT == true ]]; then
bt_prompt_char="%(!.%F{red}#.%F{green}${bt_prompt_char}%f)" bt_prompt_char="%(!.%F{red}#.%F{green}${bt_prompt_char}%f)"
fi fi